Re: Arrays as class members
| From: | Pavel Jartsev | Date: | Wed, 20 Dec 2000 18:29:59 +0000 |
| Subject: | Re: Arrays as class members | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31277@lists.php.net to get a copy of this message | ||
Geoff Coffey wrote:
>
> I'm new...
>
> Can someone explain why this fails:
>
> $this->$fields['test'] = 1
>
> What I end up with is $this->$fields == 1, which is not at all what I want.
> This assignment keeps clobbering my array...
>
Maybe you should use $this->fields['test'].
--
Pavel a.k.a. Papi