Philip Olson wrote:

> > 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

Ok, tested it and to my surprize it does work. But why?!

Questions:
1. $letter++ -- why doesn't this evaluate $letter as integer before
incrementing?
2. print $letter++ -- why doesn't this evaluate to "b" at the first loop when
it's already 'a'? Ok, this I may be able to explain because it's neither "print
++$letter" nor "print ($letter++)", but I wouldn't have trusted this syntax to
work this way a million years!

Nice, elegant code indeed! Apologies for doubting it! :-)

Bogdan




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to