我有一個查詢,它從db中檢索到多行的兩列。我想要它在使用php的表格中顯示,我必須使用二維數組請幫助我如何繼續。的[什麼是學習PHP的最好的地方]如何通過PHP中的數組循環顯示結果
while($row=mysql_fetchrow_array($qry))
{
Please guide how to store the columns in the array[][]
}
[Please guide on how to display the result in the display page]
foreach( )
{
}
可能重複(http://stackoverflow.com/questions/3793134/what-is-the-best-place-to-learn-php ) – Gordon 2010-10-14 08:08:19
在我以前的答案中的一個小例子:http://stackoverflow.com/questions/3140714/separating-logic-style-in-php-properly/3140805#3140805一個真實的例子,不像下面發佈的 – 2010-10-14 08:19:56
有例子在PHP手冊中:http://de3.php.net/manual/en/mysqli-result.fetch-assoc.php – Gordon 2011-03-12 13:56:06