note 15590 deleted from ref.strings by philip

From: Date: Sat, 21 Dec 2002 01:40:11 +0000
Subject: note 15590 deleted from ref.strings by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-41166@lists.php.net to get a copy of this message
while we're waiting that ctype functions get out from experimental phase, look at this function. It check if a string contain only alphanumeric characters (a-zA-Z0-9) function isalphanumstr($string) { for($i = 0; $i < strlen($string); $i++) if (!in_array($string[$i], array("q","w","e","r","t","y","u","i","o","p","l","k","j","h", "g","f","d","s","a","z","x","c","v","b","n","m","Q","W", "E","R","T","Y","U","I","O","P","L","K","J","H","G","F", "D","S","A","Z","X","C","V","B","N","M","0","1","2","3", "4","5","6","7","8","9"))) { return false; } else { return true; } }

« previous php.notes (#41166) next »