Hi
I have been trying for a long time to "learn" how to do this but tutorials only go so far and I haven't found anyone to hold my hand through it yet (well my husband but he only uses the computer to play pool :rolleyes: )
Here is what I would like to do - if this is not possible please let me know so I can put it to sleep.
class Dog {
var = $dog_id;
function Dog($dog_id) {
this->dog_id=$dog_id;
}
function GetDetails {
retrieve stuff from db tables where id= this->dog_id;
echo name;
Return fields[mom_id and dad_id];
}
}
Now here is where I get lost. I have read that the Return stops the function but am not sure if it stops the class too. That's OK as this is all I need the class to do but can I have the class do the Return so that the variable for the parents ID can be used outside of the "object"? If so how is that written so that I can give a variable name to the returned values?
Additionally can I use different variable names for the Return with each occurance of the class and with multiple occurances on the same page.
Part of my brain says this should be relatively simple - but I still can't figure it out. Help in figuring this out would be greatly appreciated.
Connie