1 回答

TA貢獻(xiàn)1846條經(jīng)驗(yàn) 獲得超7個(gè)贊
你試過(guò)嗎?您的代碼可以這樣編寫:ob_startob_get_clean
<?php // assuming php open here...
ob_start(); ?>
<div class="quick-view-list nav">
<?php
// do your conditional operator here....
?>
<a class="active" href="<?php echo $similarProduct0; ?>">
<img src="<?php echo $similarProductImg0; ?>" alt="Similar Product" width="100px" height="112px">
</a>
<a href="<?php echo $similarProduct1; ?>">
<img src="<?php echo $similarProductImg1; ?>" alt="Similar Product" width="100px" height="112px">
</a>
<a href="<?php echo $similarProduct2; ?>">
<img src="<?php echo $similarProductImg2; ?>" alt="Similar Product" width="100px" height="112px">
</a>
</div>
<?php
echo ob_get_clean();
- 1 回答
- 0 關(guān)注
- 110 瀏覽
添加回答
舉報(bào)