HELP! .... Invalid argument supplied for foreach()


this is being driving me nuts, do you see something wrong in this line of code?

foreach($PAGES[$cid] as $pid => $pdata)

any help will be welcome.>!



Unless you are using a multi-dimensional array.

You are passing a SINGLE value (as specified by $PAGES[$cid]) when you should be passing an ARRAY.

foreach($PAGES as $pid => $pdata);
(also don’t forget the ; at the end


Thanks a lot, peg110… :D


My Pleasure.

Happy coding