我有一個問題給你們。 即時通訊設法打印一個陣列,它將顯示根據用戶表的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