Rumah > Artikel > pembangunan bahagian belakang > 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>
以上就介绍了php变量-单引号不编译,双引号编译,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。