RE: [PHP] Concerning number_format()

From: Date: Thu, 06 Nov 2003 14:33:01 +0000
Subject: RE: [PHP] Concerning number_format()
Groups: php.general 
Request: Send a blank email to php-general+get-168725@lists.php.net to get a copy of this message
[snip] $price = "1234.567890"; $price = number_format($price, 2, '.', ''); echo $price; Returns 1234.567890 Should return 1234.57 correct? [/snip] Use a new variable to hold the modified information $price = "1234.567890"; $newPrice = number_format($price, 2, '.', ''); echo $newPrice;

« previous php.general (#168725) next »