Welcome Guest, Not a member yet? Register   Sign In
Pass data to a partial inside a loop
#6

(This post was last modified: 10-26-2020, 04:44 PM by InsiteFX.)

Do what I do so all views will see the data.

Create a dummy view with nothing in it, data_view.php leave it empty. 

Then load this view as the first one.

PHP Code:
echo view('data_view'$data); 

Also don't include the partial view load like a regular view.


PHP Code:
<?= view('your_partial_view');?>

When you use include it will not see the data variables.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
Pass data to a partial inside a loop - by nneves - 06-21-2020, 04:46 AM
RE: Pass data to a partial inside a loop - by InsiteFX - 10-26-2020, 04:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB