On this page I will show an example of using "" and '' in PHP. A double quote allows us to use variables as defined. A single quote will print the specific characters within the text, not the variable.



To use double quotes I need to use the escape slash like "this" to tell my code that I want it to identify those quotes as part of the text, not part of the code. If I didn't do that it would believe that the echo command ended at the word 'this' in the string.



When using a single quote in your string, you 'must' do the same.