Welcome Guest, Not a member yet? Register   Sign In
problem passing an array to a view

Hi all.

in the controller i have $list that is an array with numeric index, and every field is an array too.

for example $list[$i]['name'] in the controller give me the correct field.

I want to print data in the view instead of the controller, but when i pass $list to a view, as explained in the guide, how can i access to the field with a loop? I had to print all the 'name' field of that array but i can't!

The array being passed from the controller to the view needs to be an associative array, not numerically indexed.

So i am obliged to "insert" the view in the controller.


Theme © iAndrew 2016 - Forum software by © MyBB