[Mapserver-users] set Filter with phpMapscript

babak.tehrani at geosysnet.de babak.tehrani at geosysnet.de
Wed Apr 30 02:58:02 EDT 2003


Hello,

in my mapfile I can use the following syntax to set a filter:

FILTERITEM "NAME"
FILTER /Germany|France/

In phpmapscript I can use following syntax:

$selection = 'France';
$layer = $map->getLayerByName("myLayer");
$layer->setFilter("\"$selection\"");

But it is not possible to wirte:

$array = array("Germany","France");
$selection = join("|",$array);

I am new to php. Is there a mistake in my code?

Thanks

Babak



More information about the mapserver-users mailing list