$hello = "这是helloworld";
$test = "{$hello}";
$test = '{$hello}';
ps:很明显双引号中的会被迭代出来,单引号就原封不动的输出来.其实在写sql的时候,我看到过比较麻烦的一种 " '. $name.' " ,完全可以,用"'{$name}'",如果比较多的话, 不需要用很多的 . 号来连接,而且也比较清晰.
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