note 33756 added to function.is-numeric
| From: | guidoz at rack1 dot php dot net | Date: | Mon, 07 Jul 2003 03:06:55 +0000 |
| Subject: | note 33756 added to function.is-numeric | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-51599@lists.php.net to get a copy of this message | ||
To verify if a char is an alphabetical char (and not a symbol) not do this:
//wrong because also a non alphabetical sympbol will pass the test
if(!is_numeric($char))
but try this...
function is_alphabetical($char)
{
$alphabetical = 'abcdefghijklmopqrstuvwxyz';
if(in_array($char,$alphabetical))
return true;
else
return false;
}
sorry for my ebglish.. I hope you'll undestand
----
Manual Page -- http://www.php.net/manual/en/function.is-numeric.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33756
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33756&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33756&report=yes