Question: how to get data from controller to view in codeigniter?
Answer: Pass array from controller to view You can paste it inside your controller file or could put in the controller object. $data['mega_header'][] = (object) array('title' => 'portfolio image' , 'img' => 'https://complete path of image' ); $this->load->view('multiple_array', $data);