Home > php教程 > php手册 > php定界符使用技巧和实例

php定界符使用技巧和实例

WBOY
Release: 2016-06-06 20:21:17
Original
2481 people have browsed it

这篇文章主要介绍了php定界符使用技巧和实例,讲解了定界符的功能和使用注意事项等,需要的朋友可以参考下

php界定符就是为了照样输出内容。它的格式如下:

复制代码 代码如下:


$str =     Here is your string
    ......
EOF;

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

附上一段php示例代码:

复制代码 代码如下:


$a = "www.jb51.net";
print
这里是{$var}的php教程
jb51;
?>

使用php定界符技巧总结:

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

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

Related labels:
php
source:php.cn
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template