PHP help evaluating an arithmetic equation
From: Alex (goog.20.farrill_at_spamgourmet.com)
Date: 10/28/04
- Previous message: Paul Barfoot: "Re: How to test response cache is working or not?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Oct 2004 14:25:15 -0700
Hi, I want to evaluate an algebraic expression stored in a string
using php.
In other words, let's say i have
$a="24<25";
I would like to evaluate $a in this case and get TRUE returned.
Is there such a function in PHP? I know the eval() function in
JavaScript would do this. using a simple if ($a) statement does not
work since PHP evaluates any string that is not NULL as TRUE.
Thanks for any help!
Post a reply or email me: goog.20.farrill@spamgourmet.com
- Previous message: Paul Barfoot: "Re: How to test response cache is working or not?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]