Because it's a string. You can use regex matching or test
whether floor($var) == $var, for example.

Steve

At 4/29/2001 04:25 AM, Jamie Saunders wrote:

>Hi,
>
>I'm submitting a phone number from an HTML form to a PHP page 
>that examines it to see if it's an integer:
>
>form.html:
>
>validate.php: <?php $phonenumber = trim($phonenumber); if 
>(is_int($phonenumber)) { echo "Integer"; } else { echo "Not Integer"; } ?>
>
>However, for some reason the script doesn't recognize the number as an
>Integer - why is this and how can I remedy it?
>
>
>Jamie Saunders
>Mail: [EMAIL PROTECTED]
>Web: http://jamie-s.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to