i want to pass an array and two variables to my view my array is passed in views successfully but the two variable is undefined.can anyone help me how to pass those values to view.i tried indexing,then the model doesn't work.
my controller
$Semister=$this->input->post('Semister');
$Dept=$this->input->post('Dept');
$this->load->model('Upload_Result_Model');
$data['subjects']=$this->Upload_Result_Model->getAllSubjects($Semister,$Dept);
$data['student']=$this->Upload_Result_Model->getAllStudent($Semister,$Dept);
$this->load->view('Faculty/upload_mid_result',$data,$Dept,$Semister);
my view
<h3>Department: <?php echo $Dept;?></h3> //error Undefined variable: Dept
<h3>Semister: <?php echo $Semister;?></h3> ////error Undefined variable: Dept
can ayone help me fixing this problem.everything works fine except $dept and $Semister. Thanks i advance