note 18944 deleted from function.gettype by didou
| From: | didou@php.net | Date: | Sun, 18 May 2003 10:05:59 +0000 |
| Subject: | note 18944 deleted from function.gettype by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-48485@lists.php.net to get a copy of this message | ||
Note Submitter: clx@ectona.de
----
If you want to check if a var contains a number, you can use this script:
<?
$var = 1234567890;
if(gettype($var)==("integer" || "double")) {
echo "number";
} else {
echo "no number";
}
?>
Warning: $var = 123; is not the same as $var="123"; !