Fixing the “invalid argument supplied for foreach()” PHP error

You can add this row, before “foreach()”, if the variable $yourvariable is not always present

if (is_array($yourvariable) || is_object($yourvariable))

Further info here.

Lascia un commento

Il tuo indirizzo email non sarĂ  pubblicato. I campi obbligatori sono contrassegnati *