Re: number_format problem
| From: | CPT John W. Holmes | Date: | Wed, 05 Nov 2003 16:56:22 +0000 |
| Subject: | Re: number_format problem | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-31434@lists.php.net to get a copy of this message | ||
From: <jeffrey_n_Dyke@Keane.com>
> could you cast as a float/double before inserting? $number = (double)
> $string;
>
> don't know what would happen to the comma, but i assume it would just get
> removed??
Everything after and including the first non-number character would be
dropped.
So "$12,000.34" would end up as zero. "12,445" would end up as 12, etc...
---John Holmes...