William Stokes wrote:
How can I test whether a string is 1 or 2 digits long?
You can use regular expressions:
preg_match('/^\d{1,2}$/',$str);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
William Stokes wrote:
How can I test whether a string is 1 or 2 digits long?
You can use regular expressions:
preg_match('/^\d{1,2}$/',$str);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php