Accessing an array of objects

From: Date: Sun, 19 Aug 2001 04:18:02 +0000
Subject: Accessing an array of objects
Groups: php.general 
Request: Send a blank email to php-general+get-63348@lists.php.net to get a copy of this message
I can't seem to figure out the correct syntax of acessing an array of objects with creating a temp. variable... Is there a workaround for not creating it, or do I just need to deal with using $tempvar = $test[1]; $tempvar->variable? here is an example of code // Start Code Snipet: for ($i = 0;$i < 11;$i++) { $test[$i] = new class(); } echo "$test[1]->variable"; //End code Snipet The echo statement would return Object->variable on the webpage Environemt info: PHP 4.06 W2k, running Apache Any help would be much appreciated, Sincerely, Athas Nikolakakos

« previous php.general (#63348) next »