|
Posted by Geoff Berrow on 10/09/59 11:44
Message-ID: <1144438457.389536.252430@i40g2000cwc.googlegroups.com> from
monomaniac21 contained the following:
>I have a php code that generates numbers. sometimes is generates whole
>numbers but most of the time decimals. How can I, when it generates a
>whole number, convert the number to n.0
>where n is the whole number?
$var=23;
print number_format($var,1);
//outputs 23.0
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Navigation:
[Reply to this message]
|