CodeIgniter Forums
how can i send array variable to view file by controller file - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: how can i send array variable to view file by controller file (/showthread.php?tid=6766)



how can i send array variable to view file by controller file - El Forum - 03-11-2008

[eluser]Unknown[/eluser]
I am using module for get record, and store database value in array variable so that i can use this variable to view file but how can i do this i am very confuse.


how can i send array variable to view file by controller file - El Forum - 03-11-2008

[eluser]dtrenz[/eluser]
Code:
class Page extends Controller {

   function index()
   {
      $data['db_array'] = $db_array;
      $this->load->view('page', $data);
   }

}


This is the one of the most basic concepts behind views. I recommend that you read the _______ manual: http://ellislab.com/codeigniter/user-guide/general/views.html