Home  >  Article  >  Backend Development  >  $sql=<<<EOT

$sql=<<<EOT

WBOY
WBOYOriginal
2016-06-20 12:49:202267browse

$sql=<<<EOTsql语句.EOT;

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


回复讨论(解决方案)

  ......   
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;?>

//运行后报错    Parse error: syntax error, unexpected '
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