+ 4
Why the output is zero?
Question: $var = 'hello'; $car = 'world'; echo $var+$car; Why the output is zero here? Please can anyone explain me?
3 Answers
+ 6
Because addition of string results in zero.
You have to use dot(.) to concatenate two strings.
$var = "hello";
$var2 = "world";
echo $var.$var2;
0
Thank you đ« Rick Grimes
0
hhj