in PHP 5 it would be
class Example {
private $foo = "old data";
public function __construct(){}
public function setVar($data){
$this->foo = $data;
}
public function output(){
return $this->foo;
}
}
$var = new Example();
$var->setVar("new data");
echo $var->output();
I never learned OO in PHP 4 and am having trouble finding where to do this. Working with a class that I have to extend a bit. Any searches on this shows me a ton of ways to do this in PHP5 but not 4
Thanks