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
Getting foreach() error
Moderators: egami, macek, gesf
- sandeep605085
- New php-forum User
- Posts: 44
- Joined: Tue Feb 26, 2013 6:00 am
- Location: Mindfire Solutions
- Contact: