Re: [PHP] print a to z

2009-01-16 Thread Jochem Maas
paragasu schreef: > i have this cute little problem. sounds more like a homework assignment. by now you know range(), by all means have array_map() too: array_map("print_r", range("a","z")); > i want to print a to z for site navigation > my first attempt work fine > > for($i = '65'; $i < '91';

Re: [PHP] print a to z

2009-01-15 Thread Kevin Waterson
This one time, at band camp, "Leon du Plessis" wrote: > I used that notation before, and it did not work 100%. > Adapt as follows: > > for ($i = 'a'; $i <= 'z'; $i++) > if ($i == "aa") break; else echo $i; > foreach(range('a', 'z') as $letter ) { echo $letter; } Kevin -- PHP General

Re: [PHP] print a to z

2009-01-15 Thread Lars Torben Wilson
ben > -Original Message- > From: Paul M Foster [mailto:pa...@quillandmouse.com] > Sent: 16 January 2009 07:55 AM > To: php-general@lists.php.net > Subject: Re: [PHP] print a to z > > On Thu, Jan 15, 2009 at 08:32:14PM -0800, paragasu wrote: > >> i have this

RE: [PHP] print a to z

2009-01-15 Thread Leon du Plessis
php-general@lists.php.net Subject: Re: [PHP] print a to z On Thu, Jan 15, 2009 at 08:32:14PM -0800, paragasu wrote: > i have this cute little problem. i want to print a to z for site navigation > my first attempt work fine > > for($i = '65'; $i < '91';

Re: [PHP] print a to z

2009-01-15 Thread Paul M Foster
On Thu, Jan 15, 2009 at 08:32:14PM -0800, paragasu wrote: > i have this cute little problem. i want to print a to z for site navigation > my first attempt work fine > > for($i = '65'; $i < '91'; ++$i) > echo chr($i); > > but someone point me a more interesting solutions > > for($i = 'a'; $i <

Re: [PHP] print a to z

2009-01-15 Thread paragasu
> $letters = range('a', 'z'); > foreach ($letters as $letter) { > echo $letter; > } wow.. that is a very nice solutions you give me chris. thanks On 1/15/09, Chris wrote: > paragasu wrote: >> i have this cute little problem. i want to print a to z for site >> navigation >> my first attempt work

Re: [PHP] print a to z

2009-01-15 Thread Chris
paragasu wrote: i have this cute little problem. i want to print a to z for site navigation my first attempt work fine for($i = '65'; $i < '91'; ++$i) echo chr($i); but someone point me a more interesting solutions $letters = range('a', 'z'); foreach ($letters as $letter) { echo $letter;

[PHP] print a to z

2009-01-15 Thread paragasu
i have this cute little problem. i want to print a to z for site navigation my first attempt work fine for($i = '65'; $i < '91'; ++$i) echo chr($i); but someone point me a more interesting solutions for($i = 'a'; $i < 'z'; ++$i) echo $i the only problem with the 2nd solutions is it only pri