There's a question. if don't need decimal point, how to do? $num="5.8"; $num=round ($num,0); echo "$num"; the result is 6 but i'd like it to be 5. i need your help. thank you
Another handy one is number_format( $number, $numberOfDecimalPlacesToShow ); So number_format( "6.4", 2 ) would be 6.40. The fun part about this function also is it can do currencies (default to US), so: number_format( "4346.1246", 2 ) would be 4,346.12