RE: [PHP] ($a = 'a'; $a <= 'z'; $a++) invalid?
| From: | Philip Olson | Date: | Thu, 14 Dec 2000 19:10:21 +0000 |
| Subject: | RE: [PHP] ($a = 'a'; $a <= 'z'; $a++) invalid? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30342@lists.php.net to get a copy of this message | ||
Hi Layne at al,
That is not my question. I want to know why it's doing what it's doing.
not an alternative method -- there are many ways to reach this specific
goal but that's not the point. The provided link showed other alternative
methods.
Thanks though.
Regards,
Philip
On Thu, 14 Dec 2000, Layne Weathers wrote:
>
> > for ($a = 'a'; $a <= 'z'; $a++) {
> > $foo .= $a;
> > }
> >
> > it returns 675 values, 'a' to 'yz' vs. 26.
>
>
> Why not do this?
>
> for($i=97; $i<=122; $i++)
> {
> $foo .= chr($i);
> }
>
>
>
> Layne Weathers
> Ifworld, Inc.
> layne@ifworld.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>