ok first of all i admit i am complete new to OOP. Secondly didnt write this script.
but there is my problem
i declare a class say dog. dog uses a constructor that has a few extra unassigned
arrays.
laster i declare a new instance of dog in another class (pets) i invoke the
constructor and all is well with a few empty arrays as part of my object. but how can
i put information in these arrays? can i do it through pet? for example can i make
a member function in pet that goes soemthing like this -
function wekkcount($id, $newpets) {
$i=0;
while($newpets[$i])
{
$this->dog[$id]->lostpets[$i] = $newpets[$i];
$i++;
}
where this refers to class pets and dog is an instance of dog?
i have been trying to all day and even though i know for sure $newpets has information
in it. i always have an empty array in pets->dog->lostpets. i am starting to believe
maybe i just cant do it. or maybe there is soemthing stupid i am missing?
Thank You,
Jon Yaggie
www.design-monster.com
And they were singing . . .
'100 little bugs in the code
100 bugs in the code
fix one bug, compile it again
101 little bugs in the code
101 little bugs in the code . . .'
And it continued until they reached 0