I want to format a float value I have to two decimal places.
For example if I have a float for a price of 5.2, I want it to be formatted as 5.20.
5.2
5.20
Try number_format:
number_format
echo number_format("5.2",2)
1.4m articles
1.4m replys
5 comments
57.0k users