+ 1
when to use double quotation marks and when single or blanket?
as you can see the result that print(eggs) is equel to that print("eggs"). but in some ways,there are big differences between them, for example when in if statements: if 10>5 print("ten is greater than five") , this is all right .but if you delete the double quotation marks,it will makes an error. who can tell me why?thanks a lot.
4 Réponses
+ 5
it depends, if you want to print the content of a variable, use double. php
+ 3
or if you want to concatenate text with the value of the variable. php
+ 1
print (eggs) will print the value of eggs
print("eggs") will print whatever is written in there i.e eggs