• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
passing huge data from controller to view...

#1
[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...

#2
[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

#3
[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.

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

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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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