我使用這個代碼存儲在一個名爲$conversions
有沒有辦法添加一個新行來顯示在HTML中的錨標籤的標題屬性?
$conversions = "GBP " . number_format($file*0.84) . "CHF " . number_format($file*1.23)
可變HTML代碼,但是我似乎無法弄清楚如何單詞「CHF」前添加一個<br>
。
任何想法?
整個代碼如下:
<?php
$file = get_field('fl_price');
if(trim($file) == ""){echo 'Price on Application' ;}else{$conversions = "GBP " . number_format($file*0.84) . "<br />CHF " . number_format($file*1.23) ;echo 'EUR ' . number_format($file) . "</br><a class=\"wp-tooltip\" title=\" $conversions \">Other Currencies</a>" ;}
?>
「echo」'$ conversions'內容的PHP行在哪裏?另外,爲什麼不能只將「CHF」改成「
CHF」?此外,請嘗試閱讀[什麼是一個很好的問題](http://stackoverflow.com/help/how-to-ask)。幫助我們來幫助你。 –
你有沒有嘗試在引號中加入它? – mario
我已經發布完整的代碼..你的答案不起作用.. –