我試圖在多個顯示£標誌和逗號與顯示貨幣,但我不知道怎麼樣,這裏是我的代碼有回聲的它爲8999999,而不是£8999999PHP貨幣顯示
<div id="form">
<form action="index.php" method="post">
<center> <input type="text" name="percent" id="percent" />
<input type="submit" /> </center>
</form>
<center>
<?php
$percent=$_POST['percent'];
$total = 8999999;
/*calculation for discounted price */
$discount_value=$total/100*$percent;
$final_price = $total - $discount_value;
echo $final_price;
?>
</center>
</div>
[number_format()](http://www.php.net/manual/en/function.number-format.php)或[money_format()](http://www.php.net/)手動/ EN/function.money-format.php)或[衝刺()](http://www.php.net/manual/en/function.sprintf.php)的[基本的PHP形式幫助 –
可能重複(貨幣顯示)](http://stackoverflow.com/questions/345704/basic-php-form-help-currency-display) – hakre