$speaker = 'Adam'; $withEscape = "$speaker says, \"PHP is useful!\"";
Output: Adam says, "PHP is useful!"
$speaker = 'Adam'; $withoutEscape = "$speaker says, PHP is useful!";
Output: Adam says, PHP is useful!
In the first double-quoted string, each backslash tells PHP to treat the following quotation mark as part of the text rather than the end of the string. The second string does not contain quotation marks inside it, so it needs no escape slash. In both examples, PHP replaces the $speaker variable with its value.