I have written a private function that allows me to call the name of the object that is being called for when I edit it but for some strange reason it is being picked up as an Undefined property why?
Troublesome Line:
$data['pageTitle'] = 'Edit '.$this->fieldTitle.' ';
Function:
private function fieldTitle($id)
{
$this->uri->segment(4);
$information = $this->form_model->showFieldInformation();
foreach ($information as $feild) {
$feildName = $feild->name;
}
return $fieldName;
}
I see two mistakes:
fieldTitle should be a function
$this-><fieldTitle()and not a variable$this->fieldTitleThere is a typo in:
you are mistyping
$fieldNameand$feildName