Bogdan Stancescu [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
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
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 :)
PROTECTED]
Subject: Re: [PHP] Re: Generate Alphabet
Hello Fred,
Tuesday, December 25, 2001, 7:55:16 PM, you wrote:
F for ($Character = 65; $Character 91; $Character++)
F {
F echo chr($Character);
F }
F Fred
F Daniel Harik [EMAIL PROTECTED] wrote in message
F [EMAIL PROTECTED]">news:[EMAIL P
This will only work with PHP 4.1.0 or later.
Consider this example:
$letter = 'a';
$i = 0;
while ($i++ 26) {
print Letter: . $letter++ .\n;
}
regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
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.
However, with just a few changes we get
$letter='a';
$i=0;
while ($letter'z') {
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
Hello Fred,
Tuesday, December 25, 2001, 7:55:16 PM, you wrote:
F for ($Character = 65; $Character 91; $Character++)
F {
F echo chr($Character);
F }
F Fred
F Daniel Harik [EMAIL PROTECTED] wrote in message
F [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hello Guys,
Just a stupid question
7 matches
Mail list logo