The Building Blocks / Page 3
The Building Blocks:
Data Types, Literals, Variables, and Constants
- The user-defined delimiter word starts and terminates the here document. Text is inserted between the delimiters. The delimiter can contain letters, numbers, and the underscore character. The first letter must be a letter or an underscore. By convention, the delimiter should be in all uppercase letters to make it stand out from other words in your script. The delimiter is preceded by three
- The delimiter cannot be surrounded by any spaces, comments, or other text. The final delimiter can optionally be terminated with a semicolon and must be on a line by itself.
- All variable and escape sequences will be interpreted within the here document.
Escape Sequences. Escape sequences consist of a backslash followed by a single character. When enclosed in double quotes, the backslash causes the interpretation of the next character to "escape" from its normal ASCII code and to represent something else (see Table 4.1). To display the escape sequences in your browser, the HTML
<pre> tag can be used (see Example 4.5); otherwise, the escape sequences placed within your PHP script will not be interpreted.
Table 4.1 Escape Sequences
|Escape Sequence||What It Represents|
|\'||Single quotation mark|
|\$||A literal dollar sign|
|\70||Represents the octal value|
|\x05||Represents the hexadecimal character|