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

command line - Use qwinsta in PowerShell ISE -

java - Incorrect order of records in M-M relationship in hibernate -

php - I want to create a website for polls/survey like this http://www.poll-maker.com/ -