我有一个查询,它从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