note 35850 deleted from function.strspn by nlopess
| From: | nlopess@php.net | Date: | Thu, 08 Jan 2004 16:11:31 +0000 |
| Subject: | note 35850 deleted from function.strspn by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-63156@lists.php.net to get a copy of this message | ||
Note Submitter: kari_hre@hotmail.com
----
As to the comment below, much wiser is to use regular expressions for matching string to some
allowed characters,
<?php
if (preg_match('#^[A-Za-z]*$#', $str))
echo 'No invalid Chars contained';
else
echo 'ERROR: contains invalid chars!';
?>
will do the same as below.