Home >Backend Development >PHP Tutorial >php定界符<<<使用技巧和实例_PHP

php定界符<<<使用技巧和实例_PHP

WBOY
WBOYOriginal
2016-06-01 11:50:441103browse

php界定符就是为了照样输出内容。它的格式如下:
复制代码 代码如下:
$str =     Here is your string
    ......
EOF;

其中EOF是自定义的变量,但要成对出现!

附上一段php示例代码:

复制代码 代码如下:
$a = "www.bitsCN.com";
print
这里是{$var}的php教程
jb51;
?>

使用php定界符技巧总结:

1.结尾,如上例jb51;必须另起一行,否则出现错误。

2.定界符内的php变量一定要像这种{$a}模式,否则不会识别。

Statement:
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