所以我试图循环这个
<div class="col-sm-4 portfolio-item">
<a href="#portfolioModal1" class="portfolio-link" data-toggle="modal">
<div class="caption">
<div class="caption-content">
<i class="fa fa-search-plus fa-3x"></i>
</div>
</div>
<img src="img/portfolio/cabin.png" class="img-responsive" alt="">
</a>
</div>
根据我的mysql_num_rows,两三次。
#portofolioModal1
将从我的表
更改为jenis_mbl行cabin.png
也会从我的表格改为foto_mbl。 所以我试着这样。
$result=mysql_query("select * from tbmobil group by jenis_mbl");
$jumlah=mysql_num_rows($result);
while($row = mysql_fetch_array($result)){
echo '<div class="col-sm-4 portfolio-item">
<a href="'.$row['jenis_mbl'].'" class="portfolio-link" data-toggle="modal">
<div class="caption">
<div class="caption-content">
<i class="fa fa-search-plus fa-3x"></i>
</div>
</div>
<img src="img/portfolio/'.$row['foto_mbl'].'" class="img-responsive" alt="">
</a>
</div>';
}
但我从未得到结果。它只显示
&#39 ;; mysql_close(); ?&GT;
然后是一个链接
&#39; $行[&#39; jenis_mbl&#39;]&#39;