• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Load view into a variable?

#1
I want to load view into a variable but also want to pass some dynamic data to the view? 
please help

This code works:
$result["view"] = $this->load->view('template/test', '', TRUE);

This returns output directly to the browser:
$result["view"] = $this->load->view('template/test', array("something"=>"something"), TRUE);

https://codeigniter.com/user_guide/general/views.html
Reply


Messages In This Thread
Load view into a variable? - by dysko - 03-01-2016, 05:25 PM
RE: Load view into a variable? - by albertleao - 03-01-2016, 09:10 PM
RE: Load view into a variable? - by pizzel - 03-01-2016, 10:57 PM
RE: Load view into a variable? - by PaulD - 03-05-2016, 03:25 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.