Home > Backend Development > PHP Tutorial > PHP variables - single quotes are not compiled, double quotes are compiled, PHP variables_PHP tutorial

PHP variables - single quotes are not compiled, double quotes are compiled, PHP variables_PHP tutorial

WBOY
Release: 2016-07-13 09:44:02
Original
1044 people have browsed it

php variables - single quotes are not compiled, double quotes are compiled, php variables

<?<span>php
</span><span>header</span>("Content-type:text/html;charset='utf8'"<span>);
</span><span>error_reporting</span>(<span>E_ALL</span><span>);

</span><span>$sTemp</span> = 'Hello World!<br>'<span>;
</span><span>echo</span> "直接打印输出:".<span>$sTemp</span><span>;
</span><span>echo</span> "在单引号里打印输出:".'$sTemp'; <span>//</span><span> 单引号不编译</span>
<span>echo</span> "<br>"<span>;
</span><span>echo</span> "在双引号里打印输出:"."<span>$sTemp</span>"; <span>//</span><span> 双引号编译</span>
Copy after login

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1051217.htmlTechArticlephp variable - single quotes are not compiled, double quotes are compiled, php variables? php header ("Content-type:text /html;charset='utf8'" ); error_reporting ( E_ALL ); $sTemp = 'Hello World!br' ; echo "Straight...
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