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

Vinko Vrsalovic v at w.cl
Wed Jul 3 16:33:37 EDT 2002


On Wed, Jan 09, 2002 at 11:31:44AM -0600, teb wrote:
 
> $class->setExpression('([COST] < $maximum)');
> 
> where $maximum is set by user text input,
> 
> Any ideas?

try:

$class->setexpression("([COST] < $maximum)");

setexpression receives a string. PHP's strings in betweeen '' are 
textually evaluated (ie no variable substitution occurs), so you
need to put those "" around it or use the . operator.

btw, the '' are not needed by mapserver, i have
this line :

$class->setexpression("($str)");

and works fine.

HTH,
-- 
V. <v at w.cl>



More information about the mapserver-users mailing list