Mostly i got the error like
[le]
Invalid argument supplied for foreach()
[/le]
for some code
[ld]foreach($item as $value)[/ld]
i know it s error for because $item is not array .if put validation of if is array or not for $item i never get that error .
but always forget to check it is valid array or not and use direct foreach and it dont show error at some level but if passed array is dynamic and it is not valid array than it give error
so i want to make wrapper function which use foreach for looping but check it first is it valid array or not , foreach is construct so i be blind . give me some direction pls
Read more