您好我想在我的產品頁面中顯示隨機廣告,我的所有產品調用while循環顯示在主頁中,我想隨機在這些產品之間添加廣告在同樣的設計中,像產品展示一樣在freekaamaal中如何在我的網站上顯示隨機廣告
我如何在產品之間展示這些廣告你能否給我這個想法?
<div class="products-grids">
<div class="col-md-12">
<?php
$id=$_GET['id'];
$result1 = mysqli_query($con,"select * from products1 where sta='Active' order by id DESC LIMIT 0 , $resultsPerPage");
while($ro = mysqli_fetch_array($result1))
{
$nam1=substr($ro['pne'],0,60);
$url1=$ro['url'];
$description1=substr($ro['description'],0,200);
$price1=$ro['price'];
$price11=$ro['price1'];
$bid1=$ro['company'];
$image=$ro['image_name'];
$time=$ro['time'];
$tag=$ro['tag'];
?>
<div class="col-md-3">
<div class="hentry post1 id="post-225396">
Display Product in loop
</div>
</div>
<?php } mysqli_close($con);?>
<!-- <div class="col-md-3">
<div class="hentry post1 id="post-225396"><img src="ads.jpg"></div>
</div> -->
</div>
<div class="clearfix"> </div>
你還沒有明白如何使用堆棧溢出:[我如何問一個好問題?](http://stackoverflow.com/help/how-to-ask) –
你只使用PHP或cms like wordpress或其他什麼 –
其核心PHP @nirpendra –