Ok, it's my turn to be aggravating...
<?php
for ($i = 1; $i <= 5; $i++) {
echo "$i \n";
}
?>
--Joey
Thou spake:
>Hi,
>
>This, I know how to do:
> $ for i in 1 2 3 4 5 ; do echo $i ; done
> 1
> 2
> 3
> 4
> 5
>
>That's great, and reminds me of python. Is there a syntax for making
>arbitrarily long numerical lists, without having to enumerate each
>number?
>
>For example, these syntax attempts failed:
> $ for i in 1-5 ; do echo $i ; done
> 1-5
> $ for i in 1..5 ; do echo $i ; done
> 1..5
> $ for i in [1-5] ; do echo $i ; done
> [1-5]
>
>Thanks,
>Ron
-- Joey Kelly < Minister of the Gospel | Computer Networking Consultant > http://joeykelly.net I'd rather crash a Ford than wreck a Chevy ___________________ Nolug mailing list nolug@nolug.orgReceived on 02/12/03
This archive was generated by hypermail 2.2.0 : 12/19/08 EST