首頁 >php教程 >php手册 >php变量-单引号不编译,双引号编译,php变量

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

WBOY
WBOY原創
2016-06-13 08:55:06983瀏覽

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>

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn