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';
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
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
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';
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 <
> $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
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;
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
8 matches
Mail list logo