note 21506 added to function.is-string

From: Date: Wed, 15 May 2002 13:07:06 +0000
Subject: note 21506 added to function.is-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-30670@lists.php.net to get a copy of this message
function is_alpha($input) { return (("a" <= $input && $input <= "z") || ("A" <= $input && $input <= "Z"))?true:false; } Seeing as how i missed a function that could check if a variable was a character or not, i made this little function. It simply checks if a var is somewhere in the alphabetical range, and if so, returned true or false. input: single character output: true/false -- http://www.php.net/manual/en/function.is-string.php http://master.php.net/manage/user-notes.php?action=edit+21506 http://master.php.net/manage/user-notes.php?action=delete+21506 http://master.php.net/manage/user-notes.php?action=reject+21506

« previous php.notes (#30670) next »