[mapserver-users] Dynamic expressions in PHP (FWD)

Stephen Woodbridge woodbri at swoodbridge.com
Wed Jan 9 10:58:05 PST 2002


You need to change:
    $class->setExpression('([COST] < $maximum)');
to:
    $class->setExpression("([COST] < $maximum)");

the single quotes prevent $maxium from be replaced by php.

-Steve W.

teb wrote:
> 
> ------------- Begin Forwarded Message -------------
> 
> From: "Dylan Rawlins" <dylan at brc21.co.za>
> To: mapserver-info at lists.gis.umn.edu
> Date: Wed, 9 Jan 2002 15:07:39 +0200
> MIME-Version: 1.0
> Content-transfer-encoding: 7BIT
> Subject: Dynamic expressions in PHP
> 
> I have a problem with inserting php variables into dynamic
> expressions. The following line works....
> 
> $class->setExpression('([COST] < 150)');
> 
> but this line doesn't work
> 
> $class->setExpression('([COST] < $maximum)');
> 
> where $maximum is set by user text input,
> 
> Any ideas?
> Thanks
> Dylan
> 
> ------------- End Forwarded Message -------------



More information about the MapServer-users mailing list