number_format question

From: Date: Thu, 31 Oct 2002 15:27:21 +0000
Subject: number_format question
Groups: php.general 
Request: Send a blank email to php-general+get-122312@lists.php.net to get a copy of this message
I using number_format where I need to turn a number say "123456789" into "123,456,789" and it works just fine. I also need it to strip the decimal out if someone enters it. I.E "123456.00" would become "123,456" the command I'm using right now is: number_format($number, ","); If I enter "123456.00" it comes out as "123". Did I miss something? Thanks, Ed

« previous php.general (#122312) next »