Re: [PHP4BETA] is string numeric

From: Date: Thu, 16 Mar 2000 15:46:23 +0000
Subject: Re: [PHP4BETA] is string numeric
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-12244@lists.php.net to get a copy of this message
Faisal: I do not think that any of the functions you listed do what this guy is looking for, do they? E.g., is_integer is our best shot.... <?php $a = "12345"; print "is_integer(\$a)? " . is_integer($a) . "\n\n"; ?> Returns: is_integer($a)? If I am not mistaken, this guy is looking for PHP equiv. to C's isdigit. --Joey Smith On Thu, 16 Mar 2000, Faisal Nasim wrote: > LI. Variable functions > Table of Contents > gettype - Get the type of a variable. > intval - Get integer value of a variable. > doubleval - Get double value of a variable. > empty - determine whether a variable is set > is_array - Finds whether a variable is an array. > is_double - Finds whether a variable is a double. > is_float - Finds whether a variable is a float. > is_int - Find whether a variable is an integer. > is_integer - Find whether a variable is an integer. > is_long - Finds whether a variable is an integer. > is_object - Finds whether a variable is an object. > is_real - Finds whether a variable is a real. > is_string - Finds whether a variable is a string. > isset - determine whether a variable is set > settype - Set the type of a variable. > strval - Get string value of a variable. > unset - Unset a given variable > > Enjoy! > > ----- Original Message ----- > From: "Harold" <harold@salt.xgroup.de> > To: "php4beta" <php4beta@lists.php.net> > Sent: Thursday, March 16, 2000 3:16 PM > Subject: [PHP4BETA] is string numeric > > > : i didnt find this function in the manual.. in coldfusion there is a > : isnumeric function which returns true or false if a string only contains > : numbers.. i think this would be a nice function to include in php? :) > :

« previous php.version4 (#12244) next »