Home > Backend Development > PHP Tutorial > PHP delimiter <<< tips and examples_PHP tutorial

PHP delimiter <<< tips and examples_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:24:42
Original
982 people have browsed it

The

php delimiter is to output the content as usual. Its format is as follows:

Copy code The code is as follows:

$str = <<< EOF
Here is your string
 …
EOF;

where EOF is a custom variable, but it must appear in pairs!

Attached is a php sample code:

Copy code The code is as follows:

$a = "www.jb51.net";
print <<< jb51

Here is the php tutorial for {$var}
jb51;
?>

Summary of tips for using php delimiters:

1. At the end, as in the above example jb51; it must start on a new line, otherwise an error will occur.

2. The php variables within the delimiter must be like this {$a} pattern, otherwise it will not be recognized.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/825377.htmlTechArticlephp delimiter is to output the content as usual. Its format is as follows: Copy the code as follows: $str = EOF Here is your string... EOF; where EOF is a custom variable, but in pairs...
Related labels:
php
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template