首页 >后端开发 >php教程 >php变量-单引号不编译,双引号编译,php变量_PHP教程

php变量-单引号不编译,双引号编译,php变量_PHP教程

WBOY
WBOY原创
2016-07-13 09:44:021040浏览

php变量-单引号不编译,双引号编译,php变量

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

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1051217.htmlTechArticlephp变量-单引号不编译,双引号编译,php变量 ? php header ("Content-type:text/html;charset='utf8'" ); error_reporting ( E_ALL ); $sTemp = 'Hello World!br' ; echo "直...
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn