+ 1
What different between single quotes and double quotes?
4 Answers
+ 13
Is a little different, both print a string but if you have a variable $color='red'; you could do : echo "color is $color" (the output will be "color is red") but if you do : echo 'color is $color' (the output will be 'color is $color')
+ 1
" i said to myself: "let's get this done!" "
in this sentence, script wouldn't know how this will be typed. I started something with double quotes and then before the word LET the script will assume I have ended it with double quotes again. that's why (starting with LET) script will be faced with some weird stuff that's not a variant neither a string
correct solution is: "I said to myself: 'let's get this done!' "
0
look dear..! There is no such difference between single and double quotes. Both are used to show strings. But the thing is some special characters like newline characters can only be used in double quotes and also if you are using double quotes then there is no need to use concatenation operator(.) to join two strings bu vise-versa not possible.
0
i dont understand what are those steings