note 10737 deleted from function.round by jimw
| From: | jimw@php.net | Date: | Wed, 02 Jan 2002 12:13:36 +0000 |
| Subject: | note 10737 deleted from function.round by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-24253@lists.php.net to get a copy of this message | ||
Make sure you are rounding a float! User-input from a <FORM> text box is a *string*, so a
user-entered number may contain commas. If round hits a comma in a number, everything to the right
of the comma is truncated.
$test = "123,456,789.99";
echo round($test);
This displays "123".