[英]Cakephp - how to add strikethrough to output
我有輸出<td><?= h($book->price) ?></td>
現在如果$book->sales_price
不為null,我想在輸出中添加刪除標記。 我如何添加刪除線的代碼?
if($book->sales_price){
//add strikethrough
}
非常感謝你!
使用刪除標記<s> Sample Text </s>
或<strike> Sample Text </strike>
示范文本
if(is_null($book->sales_price)) {
<td><?= h($book->price) ?></td>
} else {
<td><s><?= h($book->price) ?></s></td>
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.