I'm retrieving a float value from a mysql database on a php page (2.5, 3.0 etc)
I would like to format this value so that if it is actually an integer, it should show zero decimal places. (it should output 3 instead of 3.0, but output 2.5 as 2.5)
What would be the simplest way to achieve this?