PHP头条
热点:

PHP 双引号与单引号的区别


单引号内部的变量不会执行,双引号会执行。


$name = hello;
echo "the $name";
会输出 the hello

而如果是单引号
$name = hello;
echo the $name;
会输出 the $name

主要区别就是这个。

www.phpzy.comtrue/phprm/24026.htmlTechArticlePHP 双引号与单引号的区别 单引号内部的变量不会执行,双引号会执行。 如 $name = hello; echo "the $name"; 会输出 the hello 而如果是单引号 $name = hello; echo the $name; 会输出 the $name 主要区别就是...

相关文章

    暂无相关文章

PHP之友评论

今天推荐