Date: 10/31/02
- Next message: ed <email protected>: "RE: [PHP] number_format question"
- Previous message: ed <email protected>: "[PHP] number_format question"
- In reply to: ed <email protected>: "[PHP] number_format question"
- Next in thread: ed <email protected>: "RE: [PHP] number_format question"
- Reply: ed <email protected>: "RE: [PHP] number_format question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[snip]
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?
[/snip]
You're missing an attribute, try
number_format($number, '', ',');
HTH!
Jay
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: ed <email protected>: "RE: [PHP] number_format question"
- Previous message: ed <email protected>: "[PHP] number_format question"
- In reply to: ed <email protected>: "[PHP] number_format question"
- Next in thread: ed <email protected>: "RE: [PHP] number_format question"
- Reply: ed <email protected>: "RE: [PHP] number_format question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

