07-22-2010, 04:50 PM | #1 |
Junior Member
Join Date: Jul 2010
Posts: 1
Rep Power: 0 |
how to suppress foreach error?
I am trying to keep some code from popping out a foreach error if the array does not exist? I keep getting this error:
Code:
Warning: Invalid argument supplied for foreach() |
Reply With Quote |
07-22-2010, 04:54 PM | #2 | |
Administrator
Join Date: Jul 2010
Posts: 402
Rep Power: 10 |
Quote:
Code:
$arr = array(); Code:
if (is_array($arr)) { ### Foreach |
|
Reply With Quote |
Reply |
Tags |
troubleshooting php |
|
|