Re: Re: Generate Alphabet

From: Date: Fri, 28 Dec 2001 06:26:53 +0000
Subject: Re: Re: Generate Alphabet
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-78915@lists.php.net to get a copy of this message
> I seriously doubt your code works -- have you tested it? I think the code > you submitted will most probably output "1 2 3 4...24 25 26" (spaces are > actually \n's). I never tested it though, so I may be mistaken. Yes, it works. Test it before posting such doubts :) Regards, Philip Olson > However, with just a few changes we get > $letter='a'; > $i=0; > while ($letter<'z') { > $letter=Chr(ord($letter)+$i); > $i++; > print("$letter<br>\n"); > } > which should work. > > Bogdan > > Philip Olson wrote: > > > Consider this example: > > > > $letter = 'a'; > > $i = 0; > > while ($i++ < 26) { > > print "Letter: ". $letter++ ."\n"; > > } > > >

« previous php.general (#78915) next »