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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -