![]() |
blank page when i try to get $this->load->view into a var with third param on true [SOLVED] - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: blank page when i try to get $this->load->view into a var with third param on true [SOLVED] (/showthread.php?tid=13091) |
blank page when i try to get $this->load->view into a var with third param on true [SOLVED] - El Forum - 11-10-2008 [eluser]meigallodixital[/eluser] i'm trying to save a view into a var with this code: Code: $data['news'] = $this->db->get('news')->result(); news view is a foreach loop with echos. But this code gives a blank page. If i omit $data: Code: $this->load->view('news','',TRUE) works, anyone knowns why? Thanks in advance. Sorry, my english is very bad ![]() blank page when i try to get $this->load->view into a var with third param on true [SOLVED] - El Forum - 11-10-2008 [eluser]John_Betong[/eluser] I reckon the problem could be on any one of your lines of code so suggest inserting this code. It will show where the data is not appearing: Code: function _show($data) { // '_' prefix to denote private function to this class blank page when i try to get $this->load->view into a var with third param on true [SOLVED] - El Forum - 11-11-2008 [eluser]meigallodixital[/eluser] returns the same blank page, if i do: Code: $data['news'] = $this->db->get('news')->result(); works perfectly. The problem seems $data+true param blank page when i try to get $this->load->view into a var with third param on true [SOLVED] - El Forum - 11-11-2008 [eluser]meigallodixital[/eluser] my fault, i have an error in pagination code, sorry ![]() blank page when i try to get $this->load->view into a var with third param on true [SOLVED] - El Forum - 11-11-2008 [eluser]John_Betong[/eluser] [quote author="meigallodixital" date="1226417492"]returns the same blank page, if i do: Code: $data['news'] = $this->db->get('news')->result(); works perfectly. The problem seems $data+true param[/quote] If you are trying to use the TRUE parameter to save the contents of a partial view then you must assign the partial view to a variable: Code: $data['news'] = $this->db->get('news')->result(); Have you read and understood Views |