$sql=<<<EOT

WBOY
Release: 2016-06-20 12:49:20
Original
2286 people have browsed it

$sql=<<<EOTsql语句.EOT;
Copy after login

$sql=<<
$sql=sprintf( sql语句 )和这种有什么区别??


回复讨论(解决方案)

<<< EOT
......
EOT;

自定义文本定界符

请参考heredoc的用法:http://blog.csdn.net/misakaqunianxiatian/article/details/47975651

Heredoc

Heredoc

相当于双引号

请参考heredoc的用法:http://blog.csdn.net/misakaqunianxiatian/article/details/47975651


<?php$v=2;  $a= <<<EOF  "abc"$v  "123"  EOF;  echo $a;?>
Copy after login

//运行后报错    Parse error: syntax error, unexpected '

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