John W. Holmes wrote:
> Then make sure $id is a number. You can use is_int, or (int), or whatever.
It appears that any numeric values passed via the URL (..?param=10001) are
automatically treated as strings. If I pass ?param=1001 to the following
script...
$type = '';
if (is_string($param)) { $type = 'string'; }
if (is_int($param)) { $type = 'integer'; }
echo 'Type: '.$type;
... I get the following result:
Type: string
But, it should be integer because 10001 is meant to be a number. How does
this work for $_GET values?
Monty
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php