array of objects, how ?

From: Date: Fri, 15 Dec 2000 18:21:26 +0000
Subject: array of objects, how ?
Groups: php.general 
Request: Send a blank email to php-general+get-30557@lists.php.net to get a copy of this message
Hello, im trying to make an array of object in php4 and dont succed :( is it possible ? has someone ever done / used one ? thanks !!! Guillaume. here is my code : var $my_array; function LoadArray(){ global $my_array ; for ($i = 0 ; $i < 10 ; $i++){ $tmp_item= new item(/*parameters*/); $my_array[$i] = $tmp_item; } } it seems to work but if i display the content of $my_array i have ten times the last one ... more if i try to display $my_array[$i-1] after storing $my_array[$i] i obtain $my_array[$i] ... thank you :)))

« previous php.general (#30557) next »