I am trying to display money numbers to users in a readable format.
At the moment the output is like so:
£ .70
I would like to make this
£ 0.70
As it is more readable and there is less chance it would get mistaken for £70
I have tried using money format
$number = money_format("#1", $number);
But I have been unsuccesfull in getting the output I desire.
I then used number_format but that only seems to work with the number itself and not how its displayed i.e. rounding number to Nth decimal place.
I have thought about doing string manipulation like so.
if ($number < 1)
$number = "0" . $number
However I am hoping SO know a better way to achieve this rather than string manipulation.
Thanks
will give you
0,44