Re: [PHP4BETA] is string numeric
| From: | Faisal Nasim | Date: | Thu, 16 Mar 2000 10:25:54 +0000 |
| Subject: | Re: [PHP4BETA] is string numeric | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-12223@lists.php.net to get a copy of this message | ||
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? :)
:
: there is currently a gettype function .. with this i get
:
: $a = "12345";
: echo gettype($a); // displays "string"
: $b = 12345;
: echo gettype($b); // displays "integer"
:
: is_numeric could work this way
:
: $a = "12345"; // or $a = 12345;
: echo is_numeric($a); // true
: $b = "12345a";
: echo is_numeric($b); // false
:
: intval is not what im after here..
:
: if there is already a function that does this, can you point me to the
: location of it in the manual..
:
: thanks
:
: Harald
: