php - i use a variable to echo the different title of different pages but i got an error -
[i got error on using variable ( $page_title ) echo page title not work , show me error ] [here code of header.php file]
<head> <meta charset="utf-8"> <title><?php echo $page_title; ?></title> <meta name="description" content="sodalitesolutions"> <meta name="author" content="sodalitesolutions"> <meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/bootstrap/css/bootstrap.css'); ?>"> <link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/font-awesome/css/font-awesome.css'); ?>"> <link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/style/slider.css'); ?>"> <link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/style/mystyle.css'); ?>"> </head>
[error :: function: _error_handler]
try add :
$this->data['title'] = 'test'; $this->load->view('view_name',$this->data);
Comments
Post a Comment