Escape PHP

Example of using escape slash

I said, "Hi, my name is Derek."

Example not using escape slash

I said, "Hi, my name is $name."



The backslash tells PHP that the character that comes after it should be viewed differently than it normally does. Without the escape slash the quotation mark could be seen as the end of the string and cause errors in the code