View Single Post
07-22-2010, 04:54 PM   #2
Jeff
Administrator
 
Jeff's Avatar
 
Join Date: Jul 2010
Posts: 402
Rep Power: 10
Jeff is getting browny points
Quote:
Originally Posted by EightyEight View Post
I am trying to keep some code from popping out a foreach error if the array does not exist?
Ok, there are a few ways.. Ideally you should declare the variable an array before you use it for anything:

Code:
$arr = array();
But if for whatever reason you cannot do that then:

Code:
if (is_array($arr)) 
{

###  Foreach
Jeff is offline   Reply With Quote