Page title not working in codeigniter?
just pass the $data
variable when loading the view, and then echo $page_title
between <title></title>
in your view.
<title><?php echo $page_title; ?></title>
Try like this:
public function index(){ $data['page_title'] = "Welcome to codigniter"; ................... ................... $this->load->view('page',$data);}
VIEW:
<title><?php echo $page_title; ?> </title>
You need to add below code in controller :
$this->data['title'] = 'test';$this->load->view('folder/viewname',$this->data);
or You can Use
$data['page_title'] = "Welcome to codigniter";
And access it with $title in your view file. Please check it.
mark it accepted if it works