PHP循环有助于添加非循环数据
我有一个PHP循环我的畅销书,但我需要在某种模式中添加一些销售点,我不知道如何做到这一点,
我需要做以下事情:
Product
Product
POS
POS
Product
Product
我怎样才能做到这一点?目前这是我的PHP循环,
<?php foreach ($featured as $product) : ?>
<?php if(isset($product->productId)) : ?>
<li>
<h3><strong>Best Seller</strong> <a href="#" title="View Dining"><?php echo $product->rangeTitle; ?></a></h3>
<a class="catJump" title="View Dining" href="#">View Dining</a>
<a class="pImageLink" title="Buy the Bistro Chair" href="#"><img width="242" height="130" title="6 Seater Cube Set" alt="6 Seater Cube Set" src="/assets/img/temp/bestseller.jpg" /></a>
<span class="bestSale">
<h4>6 Seater Cube Set<br /><em>was <strike>£3995</strike> NOW £2995</em></h4>
<a class="quickview" href="#" title="View Details"><strong>SAVE 10%</strong> Click here</a>
</span>
</li>
<?php endif; ?>
<?php endforeach; ?>
没有找到相关结果
已邀请:
1 个回复
先对冈蒲
我让你用你想要的替换
语句