Examples of Using Escape Slashes Vs Not Using Escape Slashes

Below is an example of me using Escape Slashes

I asked my friend "What is 25 * 50?"


Here, the backslashes before the double quotes tell PHP to treat those double quote as part of the string within the code,
not as just the end of the string.

Below is an example of me not using Escape Slashes

My friend says:1250

Here, I don't use the backslashes,
so PHP treats the special characters like quotes as there are no special characters that need escaping.