我只能获取数据库每一行的第一张图像。如何使用预编译语句和爆炸功能获取所有图像。
context.xml
uploads folder structure of images
Images are saved in database in this format.I want to fetch these images
答案 0 :(得分:0)
在迭代数组索引爆炸后尝试循环遍历数组:
for($i=0; $i<count($property_img2); $i++){
echo '<img class="img-zoom" src="uploads/' . $property_img2[$i] . '" width="200" height="150" alt="not fetched"> ';
}
然而,我同意您的设计很差的评论,并且您可能会考虑将其更改为一对多关系。