Inherited Arrays within objects problem.

From: Date: Sat, 23 Dec 2000 05:03:13 +0000
Subject: Inherited Arrays within objects problem.
Groups: php.general 
Request: Send a blank email to php-general+get-31653@lists.php.net to get a copy of this message
I'm seriously confused. I have two classes: class one { function one(){ $this->myArray = array(); } function addRow($name,$stuff){ $this->myArray($name)=$stuff; } function removeRow($name){ unset($this-myArray($name)); } } class two extends one{ function two(){ $this->one(); } } Now if I instantiate one, I can add and remove rows form the array. If I instantiate two, I can add rows but never remove them. I've tried array_splice and unset. within the function two->removeRow() the count drops by one but once I'm outside of the function, it goes back to the original size. Anyone got ANY idea what I'm doing wrong here? TIA, Cal * * Professional Nerd Herder * http://www.calevans.com *

« previous php.general (#31653) next »