Jump to content

Variable passed to each() is not an array or object


FUNKAM35

Recommended Posts

<?php
global $places;
$comm = $GLOBALS["location"];
$comm=trim($comm);
while(list($one,$two) = each($places))
{
	echo  "<option value=\"$two\"";
	if ( $two == $comm)echo "selected ";
	echo ">$two</option>\n" ;
}
?>
Variable passed to each() is not an array or object

Hi, my code works fine but it is giving the error message

Please can anyone help?

Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.