Re: Arrays as class members
| From: | Cynic | Date: | Wed, 20 Dec 2000 17:52:16 +0000 |
| Subject: | Re: Arrays as class members | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31262@lists.php.net to get a copy of this message | ||
$this->fields['test'] = 1 ;
At 18:47 20.12. 2000, Geoff Coffey wrote the following:
--------------------------------------------------------------
>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...
>
>Thanks,
>
>Geoff
>
>
>--
>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
------end of quote------
____________________________________________________________
Cynic:
A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.
cynic@mail.cz