[solved] Parsing array to view problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: [solved] Parsing array to view problem (/showthread.php?tid=33708) |
[solved] Parsing array to view problem - El Forum - 09-06-2010 [eluser]snortop[/eluser] I have problem parsing my array into the view. I get the page and i get a single row data. But when im parsing into the array, i get a Quote:Message: Trying to get property of non-objectWhat am i doing wrong?? My view page, from controllers Code: function view() The getpagebyname from model Code: function getpagebyname($pagename) page/view Code: <table style="text-align: left; width: 100%;" border="1" [solved] Parsing array to view problem - El Forum - 09-06-2010 [eluser]sqwk[/eluser] Try a print_r or var_dump to see what exactly is set in the pagedata object. [solved] Parsing array to view problem - El Forum - 09-06-2010 [eluser]snortop[/eluser] well i completly recoded it. using Code: $data = array(); So now it works.. Looking back now... maybe i should have used a ',' in back of the dif array. Code: $data = array( [solved] Parsing array to view problem - El Forum - 09-06-2010 [eluser]Kumar Chetan sharma[/eluser] first of all I will rewrite this Code: echo anchor("page/edit/$pagedata->head","Rediger"); Code: echo anchor('page/edit/'.(isset($pagedata->head)?$pagedata->head:''),"Rediger"); |