note 54363 added to function.eregi
| From: | binan at okuldayiz dot biz | Date: | Fri, 01 Jul 2005 13:02:25 +0000 |
| Subject: | note 54363 added to function.eregi | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-91261@lists.php.net to get a copy of this message | ||
<?
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...
//
//:)
?>
----
Manual Page -- http://www.php.net/manual/en/function.eregi.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54363
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54363&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54363&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54363&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54363&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54363&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54363&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54363&report=yes
Search -- http://master.php.net/manage/user-notes.php