I'm trying to determine if the characters in a string really should be a float I have this code so far
PHP Code:
if ( strstr($val'.') && is_numeric(trim($val'.')) ) {

but it doesn't work. For testing, $val is '1.63'. It being changed to an integer with this code
PHP Code:
if ( is_numeric($val) ) {

and then I assume since that prunes out the decimal, it's not being picked up by the float checker.

Any idea to fix this? I'm going to try putting the float checking code first and see if that makes a difference.