note 39810 deleted from function.ctype-alnum by hholzgra
| From: | hholzgra@php.net | Date: | Sun, 23 Jan 2005 23:59:26 +0000 |
| Subject: | note 39810 deleted from function.ctype-alnum by hholzgra | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-83843@lists.php.net to get a copy of this message | ||
Note Submitter: KlinX at msn dot com
----
I think "thehiddenfire" wanted to say is that "ctype_alnum" would be like this:
<?php
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 "&&".