PHP Escape Slash

Using Escape Slash

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

Not Using Escape Slash

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

I use the escape slash when I want to include quotation marks inside a string. The backslash tells PHP that the quotation mark is part of my text. Without the escape slash, I can use different outside quotes so PHP can still understand where my text starts and ends.