Question about flat array |
[eluser]kripton11235[/eluser]
Hello guys, I’m learning about Code Igniter reading the book “Professional Code Igniter”, the book is very good, but I’m the following problem: The PHP Error was encountered Severity: Notice Message: Undefined variable: navilist Filename: views / navigation.php Line Number: 2 That mistake should be solved by creating a function in the model as the following: http://pastebin.com/me04164a but the error persists, how can I resolve it? (My index function is as follows: http://pastebin.com/m7d45acc8) P.S Sorry for my terrible English.
[eluser]Pascal Kriete[/eluser]
It's a typo. In your controller you have $data['navlist'], but in your view you're using $navilist (notice the stray i). Change it to $navlist and you should be good to go .
|
Welcome Guest, Not a member yet? Register Sign In |