note 39810 added to function.ctype-alnum
| From: | KlinX at msn dot com | Date: | Wed, 11 Feb 2004 13:11:21 +0000 |
| Subject: | note 39810 added to function.ctype-alnum | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-65010@lists.php.net to get a copy of this message | ||
I think "thehiddenfire" wanted to say is that "ctype_alnum" would be like this:
function ctype_alnum($text) {
for ($i = 0; $i<strlen($text); $i++) {
if (!ctype_alpha($text[$i]) && !ctype_digit($text[$i]))
return false;
}
return true;
}
Note that I've changed the "if" condition to "&&".
----
Manual Page -- http://www.php.net/manual/en/function.ctype-alnum.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39810
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39810&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39810&report=yes
Search -- http://master.php.net/manage/user-notes.php