I know that for the past few articles we’ve looked at strings, but we never actually talked about them. A string is just a sequence of characters surrounded by quotes; strings in PHP are placed inside either single or double quotes. In other programming languages, like Java, strings are surrounded by double quotes and individual characters are surrounded by single quotes.
The problem with that code is that PHP interpreter starts looking at the code and says: If you insist on having the single quotes surrounding the overall string, and use them inside the string itself, than you will have to “escape” the single quote character.
If you really wanted to use single quotes, you can concatenate (join) the variable with the concatenation (dot) operator.