我使用PHP通過查詢傳遞使頁面更具動態性但是我有一大塊HTML代碼需要內部有動態內容但我不知道如何去這樣做,沒有打印每聲明:PHP塊中的大塊HTML代碼
一個在HTML部分:
<div class="review">
<p>
<img src="http://www.cs.aub.edu.lb/hsafa/cmps278/hw2/rotten.gif" alt="Rotten" />
<q>Expect no intelligence or subtlety here, but if you're willing to put up with the sheer ridiculousness of it all, you might enjoy wallowing in Bekmambetov's shameless exhibition of narrative lunacy and technical fireworks in this movie.</q>
</p>
</div>
<div class="personal">
<p>
<img src="http://www.cs.aub.edu.lb/hsafa/cmps278/hw2/critic.gif" alt="Critic" />
Frank Swietek <br />
<span class="italic">One Guy's Opinion</span>
</p>
</div>
上面的代碼是一個單一的審查但有可能是和我已經服用的次數任意數量的評論,但我我也在改變所有評論的形象,報價和文字。 有沒有包含所有標籤而不打印全部標籤的方法?
將其轉換爲模板。 – jeroen 2013-03-01 16:47:01
http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc – j08691 2013-03-01 16:48:09