foreach that has no value - 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: foreach that has no value (/showthread.php?tid=45504) |
foreach that has no value - El Forum - 09-23-2011 [eluser]Unknown[/eluser] this has been my problem now because some of my data should be null my problem is when I have null values i encounter this error A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: views/index.php Line Number: 91 I wonder how to redirect this error to <?php echo No message found ?> or just blank without any error my views Code: <?php foreach ($verses as $verseItem):?> controller Code: function home() { model Code: public function gethomeverse () { |