I used the following code to generate +, - and *
function symbol() {
$values = "+-*";
$string = $values{rand(0, 2)};
return($string);
}
And I have two numbers 3 and 4
I want to used the randomly generated symbol to either add, minus or time 3 and 4. How do I do that using PHP? Thanks in advance