note 41311 added to control-structures.for

From: Date: Tue, 06 Apr 2004 08:53:40 +0000
Subject: note 41311 added to control-structures.for
Groups: php.notes 
Request: Send a blank email to php-notes+get-67698@lists.php.net to get a copy of this message
<maliadavid at hotmail dot com> wrote: <quote> //doing math with characters is fine! for($letter = 'a'; $letter <= 'z'; $letter++) echo "$letter "; Will display: a b c d e f g h i j k l m n o p q r s t u v w x y z </quote> NO, it will not! Check out previous posting from <hayes029 at bama dot ua dot edu>: <quote> for ($i="A"; $i <= "Z"; $i++) echo "$i<br>"; will actually output A-Z, then begin again with AA, AB, etc. until it finishes with YZ. Similarly, </quote> the same counts for your code, it's just lowercase... Just wanted to note this, Ben ---- Manual Page -- http://www.php.net/manual/en/control-structures.for.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41311 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41311&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41311&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#67698) next »