I have put together this simple logic to add two numbers, echo the values for a and b then show the answer, it's pretty late here but i cant understand why the answer is NOT the sum of $a + $b. I thought this was ABC stuff but a little help would not go a miss. Thank you in advance.
$number_one = mt_rand(1,100);
$number_two = mt_rand(1,100);
function add_numbers($a, $b)
{
$sum = $a + $b;
return $sum;
}
echo "What is " . $number_two . " + " . $number_two . "? <br />";
$answer = add_numbers($number_one, $number_two);
echo $answer;