CodeIgniter Forums
Word 'Array' is displaying in my webpage - 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: Word 'Array' is displaying in my webpage (/showthread.php?tid=31826)



Word 'Array' is displaying in my webpage - El Forum - 07-03-2010

[eluser]Unknown[/eluser]
hi to all codeigniter users.
My site is displaying with the word 'Array' whenever i load my webpage. I found that it is coming from controller class .
when i make php comments for the following line $this->output->set_output($outputData); in the index function ,it does not show the word 'Array'.
Can any experts give the solution ?


Word 'Array' is displaying in my webpage - El Forum - 07-03-2010

[eluser]InsiteFX[/eluser]
Not without seeing your code!

InsiteFX


Word 'Array' is displaying in my webpage - El Forum - 07-03-2010

[eluser]Jelmer[/eluser]
What InsiteFX said, without code it's impossible to say.

In all likelyhood you're adding an array to a string or trying to echo/print an array somewhere. PHP can't convert an array to a string when you do that, so it just prints the string "Array" instead.


Word 'Array' is displaying in my webpage - El Forum - 07-03-2010

[eluser]John_Betong[/eluser]
Try adding die(); immediately before your script: $this->output->set_output($outputData);

If the ouput shows array(); then remove die() and step back, preferable halfway though your script and try to pinpoint the line which produces the array() output.