note 54361 deleted from function.eregi by betz
| From: | betz@php.net | Date: | Fri, 01 Jul 2005 15:00:17 +0000 |
| Subject: | note 54361 deleted from function.eregi by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-91264@lists.php.net to get a copy of this message | ||
Note Submitter: binan at okuldayiz dot biz
Reason: bad code
----
<?
function correct_word($word){
$permit="abcdefgijklmnoprstuvyz1234567890-_."; //you write what you want character . .
.
for($i=0; $i<strlen($word); $i++){
if(!eregi($word{$i},$permit)){
return "'$word' is wrong !!!";
}
}
return "'$word' is true !!!";
}
echo correct_word("bunyas123-_.");
//
//i think that's easy...
//
//:)
?>