Welcome Guest, Not a member yet? Register   Sign In
Data not passing from controller to view
#4

[eluser]CroNiX[/eluser]
If you are sending $data['artist'] to your view, then in your view that variable is accessible by $artist, not $data['artist']. CI runs extract() on the $data array when sending it to the view.

If you want to still have the $data array defined (perhaps you want to group related data), then you need to send $data['data']['artist'] to the view and then $data['artist'] would be available.


Messages In This Thread
Data not passing from controller to view - by El Forum - 05-05-2013, 07:06 PM
Data not passing from controller to view - by El Forum - 05-06-2013, 06:02 AM
Data not passing from controller to view - by El Forum - 05-06-2013, 07:57 AM
Data not passing from controller to view - by El Forum - 05-06-2013, 09:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB