I’m running a small currency test and can’t seem to get a satisfactory output in that either the results is short a numeric value at the end or has an unnecessary one at the beginning.
For example this returns a Euro value of 25.4 and I want to see 25.40
Code: Select all
<?php
$dollar = 40.00 ;
$euro = 0.63 ;
$total = ($dollar * $euro);
echo $total ;// 25.4
?>Code: Select all
<?php
$dollar = 1.50 ;
$euro = 0.63 ;
$total = ($dollar * $euro);
echo $total ;// 0.945
?>Thanks