Page 1 of 1

Re: Getting foreach() error

Posted: Fri May 03, 2013 12:39 am
by sandeep605085
Hi,

foreach always takes array.
http://php.net/manual/en/control-structures.foreach.php

I think $locations['citynames'] and $locations['countrynames'] are not array that's why its giving the error as Invalid argument supplied for foreach().

If you can post the $locations content and the function cs_get_locations. then it will be easy to solve what should be the exact parameter.

Thanks,
Sandeep Agrawal
Mindfire Solutions