Hello everyone,
i have been trying out object oriented programming with php recently and upon trying out inheritence, i could add new methods on top of the existing ones that already appear in the parent class, but i can't seem to add any new class varaibles.
my codes appear something like the following
Class Ferrari extends Car
{
var $engineMake;
function setEngineMake($make){
$this->make = $make;
}
}
when i try to print out the value of engineMake however, nothing is being outputted. i've checked to ensure that the corrent value was passed in.
any advise would be greatly appreciated. thank you.