Message: Undefined variable |
Guys,
I wanted to know why you're giving the message of non-existent variable. Here are the model , controller and view my project. The problem is that it says that the variable $ banner is not set. Thank you Error Code: A PHP Error was encountered Controller Code: class Banner extends CI_Controller { Model Code: <?php Page Code: foreach ($banner as $item){ ?>
You haven't shown line 129 of index.php, or else we would see $chupeta there, and it has not been declared or else you would not get this error. This is not a CodeIgniter issue, but rather a PHP issue. This is also just a PHP notice, which means that it would not stop execution. In a production environment (normally not displaying errors), you would not notice any problems. It is better to fix this and understand why. So, please show us line 129 of index.php, and also where and how you declared $chupeta. Everything you showed is useless for debugging.
|
Welcome Guest, Not a member yet? Register Sign In |