How can you call you create a array of classes inside another class that does not loose it's value after it goes out of scope.
Thanks,
Shawn
class parent_class {
var $ar_array = array();
function set_two () {
$this->ar_array[0] = new child_class();
$this->ar_array[0]->name = "name";
$this->ar_array[1] = new child_class();
$this->ar_array[1]->name = "name";
// This prints name twice
print $this->ar_array[0]->name;
print $this->ar_array[1]->name;
}
// This prints nothing shoulkd print "name name"
function print_two () {
print $this->ar_array[0]->name;
print $this->ar_array[0]->name;
}
}
class child_class {
var name;
}