*

dollar4all

  • *
  • 2 posts
PHP Warning: Invalid argument supplied for foreach()
« on: March 18, 2020, 09:43:36 PM »
hi,

PHP Warning:  Invalid argument supplied for foreach() in /search.php on line 127
<?php foreach ($aCities as $city) {?>

 thank you

Marked as best answer by frosticek on March 19, 2020, 01:06:45 PM
*

MB Themes

Re: PHP Warning: Invalid argument supplied for foreach()
« Reply #1 on: March 19, 2020, 10:22:17 AM »
@dollar4all
Try this:
Code: [Select]
<?php if(count($aCities) > && is_array($aCities)) {?>
  <?php foreach ($aCities as $city) {?>

  <?php ?>
<?php ?>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

dollar4all

  • *
  • 2 posts
Re: PHP Warning: Invalid argument supplied for foreach()
« Reply #2 on: March 19, 2020, 10:46:59 AM »
hi, thank you

when i applied got this error
PHP Parse error:  syntax error, unexpected '}', expecting end of file in /search.php on line 135
 <?php } else { ?>

thank you