cast (int) question
| From: | Mike | Date: | Wed, 13 Feb 2002 03:02:05 +0000 |
| Subject: | cast (int) question | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-16879@lists.php.net to get a copy of this message | ||
I am using commas in a form for figures that is using the commas for
thousand seperator ie:
600,000 up to and over 1,000,000 1,200,000 etc
I am using this to convert to INT for a mySql query:
$ThisPrice=(int)$Price ;
I do not see how I deal with the comma however.
I use: $ThisPrice=(int)($Price*1000) ;
when below a million but I get "1" when above a million so
1,200,00 gives 1
Is there anything esle I can do?.
Mike