On Thursday, April 18, 2002, at 02:58  PM, Jeroen Timmers wrote:

> i want to check if a given string has only numbers
>
> for exampl
>
> $test = "343124312" TRUE
> $test1 = "q34daf23423" FALSE

use either is_numeric(), or for whole numbers only, use a regex:

preg_match('/^\d+$/', $test);




----

Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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

Reply via email to