Skip to main content
Participating Frequently
August 3, 2006
Question

Formatting Numbers

  • August 3, 2006
  • 1 reply
  • 323 views
Hi!

I know I should know this! I have just started with PHP - I have used ASP in the past. If I bring a field from a recordset and place it on the page, I can use dreamweaver to format it to use commas when it is over 1,000 or decimal points. I can't figure out how to do the same thing in PHP! (using MySQL - field set to float?)

Thanks!
Julie
This topic has been closed for replies.

1 reply

Inspiring
August 3, 2006
tccdover wrote:
> I know I should know this! I have just started with PHP - I have used ASP in
> the past. If I bring a field from a recordset and place it on the page, I can
> use dreamweaver to format it to use commas when it is over 1,000 or decimal
> points.

http://www.php.net/manual/en/function.number-format.php

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/