在我开始之前,我只需要一些建议。基本上我有一个来自mysql的书籍数据数组-ID,名称,流派,评级它们打印在这样的数组中
Array ( [book] => Array ( [0] => 1 [1] => book one [2] => horror [3] => 8.9 ) )
Array ( [book] => Array ( [0] => 2 [1] =>book two [2] => Comedy [3] => 8.3 ) )
Array ( [book] => Array ( [0] => 3 [1] =>book three [2] => Comedy [3] => 8.7 ) )
等等..我如何将每个数组放在单独的 div 中?
PS PHP 代码获取数据
$query=mysql_query("SELECT*FROM book ");
while($row = mysql_fetch_array($query)) {
$book= Array("book" => Array($row['id'], $row['name'],$row['genre'],$row['ratings']));echo"<br>";
print_r( $book);
谢谢