Getting foreach() error

Links for php scripts

Moderators: egami, macek, gesf

Post Reply
User avatar
sandeep605085
New php-forum User
New php-forum User
Posts: 44
Joined: Tue Feb 26, 2013 6:00 am
Location: Mindfire Solutions
Contact:

Fri May 03, 2013 12:39 am

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

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests