Re: divide

From: Date: Wed, 10 Sep 2003 00:06:33 +0000
Subject: Re: divide
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-162122@lists.php.net to get a copy of this message
On Tuesday 09 September 2003 05:04 pm, phpu wrote: > yes but if the result is a number like this 34056983 i wanna display this > number like this 34,056,983 Please help me with this one that's exactly what number_format() does... from the example on www.php.net/number_format : <?php $number = 1234.56; // english notation (default) $english_format_number = number_format($number); // 1,234 // French notation $nombre_format_francais = number_format($number, 2, ',', ' '); // 1 234,56 $number = 1234.5678; // english notation without thousands seperator $english_format_number = number_format($number, 2, '.', ''); // 1234.57 ?> that's all there is to it.

« previous php.general (#162122) next »