How do you convert a number to a string showing dollars and cents?
eg: 123.45 => '$123.45' 123.456 => '$123.46' 123 => '$123.00' .13 => '$0.13' .1 => '$0.10' 0 => '$0.00'
If you just want something simple:
'$' . number_format($money, 2);
number_format()
1.4m articles
1.4m replys
5 comments
57.0k users