我有一个问题给你们。 即时通讯设法打印一个阵列,它将显示根据用户表的10个值。 这是我有这么远,只显示第一行,php打印阵列的10个结果
session_start();
// Retrieve all the data from the table
$result = mysql_query("SELECT name,location,login_id FROM table WHERE login_id = $user[login_id]")
or die(mysql_error());
// store the record of the "example" table into $row
$row = mysql_fetch_array($result);
// Print out the contents of the entry
echo " name ".$row['name'];
echo " located ".$row['location'];
..... 我怎样才能显示前10行? 帮助将被折衷。 感谢您的阅读。
其实,你的数组只包含**一个**结果 – 2011-02-14 10:55:30
@Col。弹片:你怎么知道的? – 2011-02-14 10:56:46
魔法!通过阅读代码 – 2011-02-14 10:58:32