我有一個在線測試結果頁,我的代碼是:如何顯示兩個小數點
echo ($r1['om']/$r['maxmarks']*100)." %";
結果顯示:61.764705882353%
如何設置61.76%呢?
我有一個在線測試結果頁,我的代碼是:如何顯示兩個小數點
echo ($r1['om']/$r['maxmarks']*100)." %";
結果顯示:61.764705882353%
如何設置61.76%呢?
echo number_format($r1['om']/$r['maxmarks']*100,2)
和實現語言是什麼? – Bathsheba
使用php編碼 – Greg
您可能想用以下標籤來標記問題:許多民間人員以標籤爲基礎進行收聽。 – Bathsheba