Re: Convert string to integer
| From: | Hendri | Date: | Fri, 09 May 2003 10:31:38 +0000 |
| Subject: | Re: Convert string to integer | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27610@lists.php.net to get a copy of this message | ||
You can use number_format function,
$value = number_format(200000000);
On Friday 09 May 2003 08:36, Delz wrote:
> Hi All,
>
> I'm using php scripts to access mysql and I just want to know how to
> convert a string to an integer wherein if I have a value of 200000000 I
> want php to output it as 200,000,000. I just want to output the numbers
> generated w/ commas to better identify if its in thousands, hundred
> thousands or millions. I normally would want to use this for computations
> wherein I would get the value from mysql and print the output on a php
> script with the pattern that I want. I hope that somebody could help me how
> to do this.
>
> Regards,
>
> Delz
--
Hendri 'cacem'
Hobbys Programmer
MCP (Microsoft Certified Pirate)