mysterious behaving an "manual array push" - Cannot use [] for reading in...
| From: | waldschrott | Date: | Tue, 11 Jul 2000 16:20:35 +0000 |
| Subject: | mysterious behaving an "manual array push" - Cannot use [] for reading in... | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-24198@lists.php.net to get a copy of this message | ||
Why do I get this error "Cannot use [] for reading in..."?
Changing the code below to use
array_push($this->$val,$nr);
solves the problem...
<?php
class a {
function a($nr) {
$var='test';
$this->$val[]=$nr; }}
new a();
?>
regards
--
o----------0-¬---------O-·---¬----o---®-----o o O ° .
| http://www.kiffen.de | pRoteçt y0ur bRaín |0 O ° ¤ °
·
0°·³°²'²³-¹'³´³°^°³~³²³°'³²²¨³²^³¹³²°²³`³º³°Þ °
o © ° . ·
| psychedelic experience | gott@kiffen.de | O ° o °
o-¬--o--0-----©-·--O-----o-----0-¤----------o 0 ° · ° . ¤ ·