RE: [PHP] arrays, loops, vars and props
| From: | Michal Migurski | Date: | Wed, 10 Mar 2004 20:32:08 +0000 |
| Subject: | RE: [PHP] arrays, loops, vars and props | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180047@lists.php.net to get a copy of this message | ||
>here's how i would do it (coding styles aside):
>
>function MyClass()
>{
> $limit = 100;
>
> $i = -1;
> while(++$i < $limit)
> {
> $this->myArray[] = $i;
> }
>}
Don't forget poor old range:
$this->myArray = range(0, 99);
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html