Re: Array of classes
| From: | Mike Frazer | Date: | Wed, 31 Oct 2001 15:19:22 +0000 |
| Subject: | Re: Array of classes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73025@lists.php.net to get a copy of this message | ||
Try something like this (you'll need to populate it afterward):
$this->array = array();
Then populate it with the data.
Mike Frazer
"Andrzej Roszkowski" <thomas@polcard.com.pl> wrote in message
news:Pine.LNX.4.33.0110310904080.29537-100000@thomas.polcard.com.pl...
>
> Hi!
>
> I have to create array of classes.
>
> When I do it this way:
>
> f add($sth)
> $this->array[] = $sth;
>
> it doesn't work :( when i'm trying to get class from there it says that
this is not an object.
>
> How to do it rigth way?
>
>
> ------------------------------------------------------------------------
> Code reviews are like sex, just anyone can do it, but skill and training
> can make you a lot better at it." - LJ
> Thomas
>