Re: checkng if string is a number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  If I misunderstood the intval part of your post, than the [proposed already] 
is_numeric solutions are the way to go. is_numeric will, however, unlike the 
conversion functions, return false if there's anything but a number in the 
string, so, i.e., is_numeric ("10a1") will return false, but intval ("10a1") 
will give "10".

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux