Hello,
I am new to PHP and am having a bit of trouble with what I am sure is a very simple thing.
I am taking an online course and working on a simple project to build a calculator. What is wrong with this line of code?
echo $_GET[“num1”] . " plus " . $_GET[“num2”] . " equals: " $result1 + $result2;
The problem is with $result1 + $result2
I am trying to get an output like this:
1 plus 2 equals: 3
If I move the $result1 + $result2 down to the next line it seems to work but not when it is on the same line.
Thanks for your help!
Joe