Undefined variable: data |
[eluser]MrCevic[/eluser]
I read http://ellislab.com/forums/viewthread/148359/ and http://ellislab.com/forums/viewthread/106551/ but none of them help me solve the problem I have. Here's my controller Code: class Entry extends Controller { and this is my debug.php view: Code: <p><?=$stuff?></p> And this is my rendered html: Quote:Debug What am I doing wrong?
[eluser]pickupman[/eluser]
The variable $data has not been set. When you are passing the $data array to a view it's array keys become the variables in your view. So in your example, for $data to be a variable in your view you would need to have: Code: $data['data'] = 'some string, array, or object'; //or |
Welcome Guest, Not a member yet? Register Sign In |