예제 #1
0
 public function addContent($content, $query)
 {
     $this->currentPost++;
     foreach ($this->items as $item) {
         $result = in_array(Parser::solve($item['equation'], array('x' => $this->currentPost)), $item['results']);
         if ($result === true) {
             echo $item['content'];
         }
     }
 }
 public function solveExpression($expression)
 {
     return Parser::solve($expression);
 }