• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Codeigniter - passing multiple data arrays to a view?

#2
[eluser]Simian Studios[/eluser]
Hi Dan

$data should just be an array, so this should work:

Code:
$data['arr'] = $arr;
$this->template->load('admin/template', 'admin/eventEdit', $data);

Then in your view you would access $arr via "$data['arr']" and treat it just like a normal array.

I would suggest giving $arr a more descriptive name also, just to avoid confusion further down the line..


Messages In This Thread
Codeigniter - passing multiple data arrays to a view? - by El Forum - 06-24-2010, 07:32 AM
Codeigniter - passing multiple data arrays to a view? - by El Forum - 06-24-2010, 07:54 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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