note 41895 deleted from function.floatval by betz

From: Date: Sun, 25 Apr 2004 08:35:01 +0000
Subject: note 41895 deleted from function.floatval by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-68757@lists.php.net to get a copy of this message
Note Submitter: ---- i have a question... so far all the examples just converts something into a float; -casting anything into a float (float)$something -functions to take $something and get only numbers however if you wanted to convert string into a float without modifcation to initial data, how would you do it? Like in java, you can use class libraries to convert string to float. if the string were: 93843string.here, it will display a error msg, because it can not be converted instead of just getting string value. can we do something like that in php? i want to use it for form, to check the input; if it is not correct input then return 1; etc

« previous php.notes (#68757) next »