RE: [PHP] math query
| From: | Johnson, Kirk | Date: | Mon, 19 Mar 2001 23:42:58 +0000 |
| Subject: | RE: [PHP] math query | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-44650@lists.php.net to get a copy of this message | ||
do an ereg_replace("[^0-9]","",$var) before the calculation, to remove all
non-numeric characters.
kirk
> -----Original Message-----
> From: Peter Houchin [mailto:peterh@vfsa.com.au]
> Sent: Monday, March 19, 2001 4:13 AM
> To: Php-General@Lists. Php. Net
> Subject: [PHP] math query
>
>
> hiya,
>
> is there a way to get php to know that $200,000 = $200000 as
> if you do a
> calculation with it $200,000 it only uses the things befor
> the comma ..