PHP Escape Slash

Using an Escape Slash

My name is "Isaiah" and I am learning PHP.

Not Using an Escape Slash

My name is "Isaiah" and I am learning PHP.

Explanation

The escape slash allows certain characters to be included inside a PHP string without ending the string. In my first example, I used backslashes before the quotation marks so PHP treats the quotation marks as part of the text instead of the end of the string.

Back to Activity 3