+ 1
temp question
what does temp = "7" temp += "2" puts temp in php mean?
2 ответов
+ 1
temp is a variable which holds value 7
temp += "2" means temp = temp + "2" = "7" + "2" = 72
0
Jennifer, In PHP your data automatically transfers!
$temp = "7";
$temp += "2";
echo $temp;
This results your temp variable to become 9! So it outputs 9.
But in other languages, like JavaScript, Java, C#, and... your data won't change and it stays as string, so they result in 72.