note 33756 deleted from function.is-numeric by nlopess
| From: | nlopess@php.net | Date: | Sat, 24 Sep 2005 07:53:46 +0000 |
| Subject: | note 33756 deleted from function.is-numeric by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-95692@lists.php.net to get a copy of this message | ||
Note Submitter: guidoz at guidoz dot it
----
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