我正在尝试在数字中显示一个 £ 符号和逗号以显示货币,但我不知道如何,这是我的代码,我的 echo 是 8999999 而不是 £8,999,999
<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>