CodeIgniter Forums
passing huge data from controller to view... - 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: passing huge data from controller to view... (/showthread.php?tid=43719)



passing huge data from controller to view... - El Forum - 07-21-2011

[eluser]Unknown[/eluser]
hi everyone..
i having problem in codeigniter,
how to pass a huge data from controller which it has more than hundreds record to a view??
is it has to use an array?
or there are any other ways to do it?

sorry for my bad english...


passing huge data from controller to view... - El Forum - 07-21-2011

[eluser]marcogmonteiro[/eluser]
when you load your view you can pass an array. That array can have has many things you'd like.

$data['records] = 'all my records';

$this->load->view('home', $data);

just like that...

try the video tutorial or the user-guide there's lot's of info there.. Wink


passing huge data from controller to view... - El Forum - 07-22-2011

[eluser]rhollister[/eluser]
Arrays are passed by reference in PHP so it is not really "passing" the array around, it is just pointing to the memory location.


passing huge data from controller to view... - El Forum - 07-22-2011

[eluser]marcogmonteiro[/eluser]
Thanks for the clarification mate =)


passing huge data from controller to view... - El Forum - 07-24-2011

[eluser]Unknown[/eluser]
thanks bro, it helps me alot ;-)