escape.php

Using escape slash

He said, "Hello Tate"

NOT using escape slash

He said, "Hello Tate"

Explanation

The escape slash (backslash) tells PHP to treat a character like a normal character instead of it giving it a special meaning. In my first example, the backslash allows double quotes to appear inside a double-quoted string without ending it. In the second one, I avoid escaping by changing quotes and concatenating.

Back