yup!
I wish to display the value in floating-points number without tailing the 0s.
i'm using php5, tried to display it by
$value = (float)$value;
but it failed.
one of my methods is using round() function.since i don't want the 0s.i try to do so:
$value=12345.670000;
$value=round($value,2);
echo $value;
// answer: 123456.67
Is there any method to display the $value besides using round() function??
let say, if the $value = 12345.675000 yet i jz want to display it until .67 but not 5 without round it..
somebody got any idea?
or i need to covert it into string and use substr() function and limit the length of string to display it?any other better way? 🙂