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

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...

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

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

Thanks for the clarification mate =)

thanks bro, it helps me alot ;-)

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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