note 1002 modified in number_format by ronabop
| From: | ronabop@php.net | Date: | Mon, 21 Aug 2000 06:44:15 +0000 |
| Subject: | note 1002 modified in number_format by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-2836@lists.php.net to get a copy of this message | ||
$my_float = 2.683526;
$new_number = number_format($my_float,2)
echo $new_number;
The result would be.. 2.68
http://www.php.net/manual/function.number-format.php