[eluser]TheBenno[/eluser]
I have read a lot of different solutions for nesting views in CodeIgniter, but all of the solutions I've found (and use) really only work for single-items. For example: you nest your "content" view inside your "wrapper" view where the wrapper contains the common header and footer, and basically just has a variable in the heart of it called $content, which gets filled with the string returned from a call to load->view.
Instead, my problem is that I want to nest a view MANY times, specifically within a for loop. Here is a simple example:
Code:
<?foreach($things as $thing):?>
/*This stuff in here is in its own view.
How do i conveniently load a view with
$thing as the data for that view?*/
<?endforeach;?>
Does anyone have any ideas on how best to solve this?
Thanks!
TheBenno