Hi guys, I'm having trouble with references...here's the scenario:
1.)I have a class with a member variable that is an array of references.
2.)The insert method of that class takes one paramter that is an object and then does:
$membervar[some_index] =& passed_in_object;
The passed in object is of the same class. Thus, it has a PrintStr method defined on it.
3.) In a subclass of this class I use a for loop and try to call the PrintStr method for each referenced object in the array:
for ($i = 1; $i <= stored_array_bound; $i++)
$this->membervar[$i]->PrintStr();
BUT, at this point I get this error:
Fatal error: Call to a member function on a non-object
Can anyone tell me what's going wrong??
Thanks,
Sonny