Undefined variable: slideshow - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Undefined variable: slideshow (/showthread.php?tid=65406) Pages:
1
2
|
Undefined variable: slideshow - davy_yg - 06-08-2016 I wonder why this error appears? Code: Undefined variable: slideshow line 107: <?php foreach($slideshow as $row) : ?> Code: A PHP Error was encountered controllers/Site.php PHP Code: // BANNER // models/Model_pages.php PHP Code: function cms_slideshow($id_slidshow_type = ""){ RE: Undefined variable: slideshow - Wouter60 - 06-09-2016 Because $query->result() returns an object, not an array. Use result_array() instead. RE: Undefined variable: slideshow - davy_yg - 06-09-2016 models/Model_pages.php PHP Code: function cms_slideshow($id_slidshow_type = ""){ I try this. I still have similar error:
Severity: Notice Message: Undefined variable: content Filename: cms/index.php Line Number: 119 Backtrace: File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\innovationci3\application\views\cms\index.php Line: 119 Function: _error_handler File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\innovationci3\application\controllers\Welcome.php Line: 24 Function: view File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\innovationci3\index.php Line: 315 Function: require_once [non-English redacted, tsk tsk!] RE: Undefined variable: slideshow - arma7x - 06-10-2016 In controller; PHP Code: $data['slideshow']= $this->model_pages->cms_slideshow(1); In View; PHP Code: NoticeMessage: Undefined variable:slideshowFilename: cms/index.phpLine Number: 107Backtrace:File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\innovationci3\application\views\cms\index.php RE: Undefined variable: slideshow - InsiteFX - 06-10-2016 If he checked the query return result he would know whats wrong! RE: Undefined variable: slideshow - davy_yg - 06-10-2016 What changes should I make? RE: Undefined variable: slideshow - suhindra - 06-10-2016 show us your complete view code, RE: Undefined variable: slideshow - davy_yg - 06-10-2016 Here is the complete views codes: views/slideshow_images.php PHP Code: <!DOCTYPE html> RE: Undefined variable: slideshow - InsiteFX - 06-10-2016 NOTE: Code: <!DOCTYPE html> RE: Undefined variable: slideshow - davy_yg - 06-10-2016 http://127.0.0.1/CompanyProfileCI/index.php/cpages/slideshowimages Still get this error message. PHP Code: [b]Fatal error[/b]: Call to undefined method Cpages::_example_output() in [b]C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\controllers\cpages.php[/b] on line [b]116[/b] |