Edit Pages |
How to fix this error message?
A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: views/editpages.php Line Number: 49 Backtrace: File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\application\views\editpages.php Line: 49 Function: _error_handler File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\application\controllers\Cpages.php Line: 269 Function: view File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\index.php Line: 315 Function: require_once Line 49: PHP Code: <?php foreach ($pages as $pages_item): ?> views/editpages.php PHP Code: <?php //$pages=array(); ?>
" If I looks more intelligence please increase my reputation."
When are you going to quit writing code and start to learn the languages and frameworks?
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Sorry, I thought that is CI framework. And I know somethings about php - already 4 years with php. Eventhough some errors makes me question something?
" If I looks more intelligence please increase my reputation."
Davy: the error message you are questioning is pure PHP ... "Invalid argument supplied for foreach()".
The $pages variable is either empty or undefined. That should be apparent to someone with four years of PHP
Lol. I think I am still new in this part and perhaps better on other part. I already read the manual and still do not understand it.
http://php.net/manual/en/control-structures.foreach.php I try to activate this: <?php $pages=array(); ?> <?php foreach ($pages as $pages_item): ?>
" If I looks more intelligence please increase my reputation."
This is the models:
models/Mpages.php PHP Code: public function update_pages($pages_id)
" If I looks more intelligence please increase my reputation."
Learn to program in PHP
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
I have read the tutorial. I only do not know how to fix this error message:
A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: views/editpages.php Line Number: 49 Backtrace: File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\application\views\editpages.php Line: 49 Function: _error_handler File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\application\controllers\Cpages.php Line: 269 Function: view File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\index.php Line: 315 Function: require_once Line 49: PHP Code: <?php foreach ($pages as $pages_item): ?>
" If I looks more intelligence please increase my reputation."
Davy: I repeat, the $pages variable is either empty or undefined.
The model snippet you provided earlier does not set $pages, as far as I can see. In line 49 of your post above, where does $pages come from???????????? It is empty or undefined!!!!!!!!!!!!! |
Welcome Guest, Not a member yet? Register Sign In |