Assignment 1

Barry Molina

Escape

In PHP strings, the backslash is used to escape characters that would otherwise have special meaning.

For example, adding an apostrophe in a single-quoted string prematurely ends the string and confuses PHP:

echo 'This is Barry's single quoted string';

Instead, insert a backslash to escape it:

echo 'This is Barry/'s single quoted string';

Result:

This is Barry's single quoted string
escape.php source code screenshot