Mega Code Archive

 
Categories / Php / Data Type
 

Number_format($n, $p, $t, $d) rounds $n to $p decimal places, using $t as the thousands separator and $d as the decimal separato

<?     echo "Total charge is ", number_format($total, 2, ".", ","), " Euros"; ?>