Given this example, how would I return the result of the equation rather than the equation itself as a string?
$operator = \'+\'; foreach($resultSet as $item
Use the eval function of PHP: http://php.net/manual/en/function.eval.php
$operator = '+'; foreach($resultSet as $item){ $result = $item[$this->orderField] . $operator . 1; eval("\$result = \"$result\";"); echo $result; }