php - How can i pass two different variables to View -
how can pass 2 different variables view controller(i using codigniter framework).
my fist variable has data records, , second variables has images data.
$dirname = "uploads/"; $images = glob($dirname."*"); // second variable. $this->load->view('includes/template',$data,$images); // not working.
it should be
$dirname = "uploads/"; $data['images'] = glob($dirname."*"); // second variable. $this->load->view('includes/template',$data);
you asccess variable in view using $images
Comments
Post a Comment