Home > Backend Development > PHP Tutorial > PHP的语法,<<<xml是什么意思?

PHP的语法,<<<xml是什么意思?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:26:23
Original
1462 people have browsed it

$template =

<code><tousername></tousername>
<fromusername></fromusername>
<createtime>%s</createtime>
<msgtype></msgtype>
<content></content>
<funcflag>%s</funcflag></code>
Copy after login
Copy after login


XML;

可以给我解释下,这里的

回复内容:

$template =

<code><tousername></tousername>
<fromusername></fromusername>
<createtime>%s</createtime>
<msgtype></msgtype>
<content></content>
<funcflag>%s</funcflag></code>
Copy after login
Copy after login


XML;

可以给我解释下,这里的

[CODE_LITE]EOT;[/CODE_LITE]
中间的文档直接输出,一个比较好理解的说法是“一个多行的echo ”。
优点是输出大段HTML或者xml等 方便,不需要转义,而且可以引用变量。

heredoc
http://php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc

定界符。。。

看着像是定义字符串的一种

Related labels:
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