Variable Operators in PHP
Posted
by BenTheDesigner
on Stack Overflow
See other posts from Stack Overflow
or by BenTheDesigner
Published on 2010-03-31T10:25:50Z
Indexed on
2010/03/31
10:33 UTC
Read the original article
Hit count: 483
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){
$result = $item[$this->orderField] . $operator . 1;
echo $result;
}
© Stack Overflow or respective owner