title: Evaluate an expression in php without Eval in CodeIgniter
body: <p>I've stored an expression in a database, e.g.:</p>
  
  <pre><code>$expression = (({TENOR} &lt;= 90) AND ({DEPOSIT_AMOUNT} &gt; 0) AND {PENALTY_BASIS} = 0 )
  </code></pre>
  
  <p>I want to evaluate the expression in an IF...Else statement and get the results</p>
  
  <pre><code>if ($expression) {action} else {other action}
  </code></pre>
  
  <p>What is the best way to achieve the result? I've tried</p>
  
  <pre><code>$this-&gt;parser-&gt;parse_string($string, $data, TRUE);
  </code></pre>
  
  <p>but the output is always a string, hence if...else statement outputs TRUE every time.</p>