I need to add more code to an existing function located inside the parent class. I'm using code like this but can't get it working :
// Parent
class Default_Fields {
public function fields() {
$this->_fields = array()
// Default Code
}
}
// Child
class More_Fields extends Default_Fields {
public function fields() {
$this->_fields = array()
// Modified Code
}
}
$new = new More_Fields;
$new->fields();
The modified code in the child class is an extended version of whats in the parent. There's no errors but the additional code is not printing.