New course! Every coder should learn Generative AI!
Try a free lesson0
$a=5; $b=4; echo "sum is".$a+$b;
Why there s an error.
2 Answers
+ 4
Missing concantention
Should be:
echo "sum is" + $a + $b;
(Add them up into one string to output)
+ 3
Also works this way
echo "sum is".($a+$b);