[ad_1]
In PHP, What is the difference between declaring methods inside class like
public function
VS function
For example:
public function contact()
{
$data['header'] = "Contact";
$this->load->view('admin/admin_contact', $data);
}
VS
function contact()
{
$data['header'] = "Contact";
$this->load->view('admin/admin_contact', $data);
}
Is it better practice to use public function or function and why?
[ad_2]