New to classes

From: Date: Sat, 24 May 2003 19:06:59 +0000
Subject: New to classes
Groups: php.general 
Request: Send a blank email to php-general+get-148869@lists.php.net to get a copy of this message
Hi, again!! I'm building a class that has an associative array the I want to reveal to the outside called $lot. Code that uses the class should be able to put data into the array. When the user has finished filling the array, they should be able to send the array back to the class for further processing. Can I get away with this: var $lot; // $lot initialized by constructor function GetEmptyLot() { return $this->lot; } function UseLot($lot) { // processing goes here } or do I use this instead $mylot = new lot; $mylot->lot['something'] = value; $mylot->lot['something'] = value; $mylot->lot['something'] = value; $mylot->lot['something'] = value; mylot->UseLot(); // where $lot is still inside $mylot Looked throught the php manual and could not find a instance of this type of code. Help!! Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net

« previous php.general (#148869) next »