This warning happens only if you try to use foreach on a non array like:
$myvar = 10; foreach ($myvar as $value) {}
If you run this, you will get:
Warning: Invalid argument supplied for foreach() in YOUR_FILE on line FOREACH_LINE
To fix this just cast $myvar to array like this:
$myvar = 10; foreach ((array) $myvar as $value) {}

I'm a programmer at 
thanks very much i got great help from it.
Comment
Thank you for this, sorted my problem, i thought i would give a minute of my time to say thank you as not everyone will, thanks for your time!
Comment