我的 mysql 数据库输出一组图像名我被困在这个循环中,请他
<?php foreach ($newarrivaldata as $row){ ?>
<?php echo $row['imgfile'].'<br/>';?>
<?php }?>
$newarrivaldata 有 18 个图像文件如何显示它们?
<div id='page1'> img1 img2 img3 img4 img5 </div>
<div id='page2'> img6 img7 img8 img9 img10 </div>
<div id='page3'> img11 img12 img13 img14 img15 </div>
<div id='page4'> img16 img17 img18 </div>
更新:var_dump($newarrivaldata)
array
0 =>
array
'idvehicle' => string '970' (length=3)
'name' => string 'Toyota RX400' (length=12)
'imgfile' => string '12122809355412.jpg' (length=18)
'imgtype' => string 'coverimg' (length=8)
1 =>
array
'idvehicle' => string '972' (length=3)
'name' => string 'asd' (length=3)
'imgfile' => string '12122815555612.jpg' (length=18)
'imgtype' => string 'coverimg' (length=8)
....upto 17=>