note 17395 deleted from function.range by jimw

From: Date: Thu, 20 Dec 2001 20:22:06 +0000
Subject: note 17395 deleted from function.range by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23393@lists.php.net to get a copy of this message
After beating my head against the wall wondering why this wasn't working with letters, I noticed the "only available in 4.1.0" disclaimer To mimic this functionality, you can make a range of letters using ASCII integer values and then convert them back to letters with chr(). For example: <?php $capitalLetters = range(65,90); //ascii integers for A-Z foreach($capitalLetters as $l) { $letter = chr($l); //convert from ASCII value echo $letter; } ?> this will print out the VERY useful string: ABCDEFGHIJKLMNOPQRSTUVWXYZ see http://www.php.net/manual/en/function.chr.php for more information

« previous php.notes (#23393) next »