John Nichel wrote:
Ed Curtis wrote:

I've been looking at the docs and found preg_match and preg_match_all but
these functions only seem to match 1 specific search item. I want to make
sure a variable (say $mlsnumber) contains only numbers and no spaces. What
would I use to accomplish this?


Thanks

Ed


There's also ctype_digit...

http://us4.php.net/ctype_digit

And if you really want to use a regex to check for just digits...

/^\d{1,}$/

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

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



Reply via email to