php双引号和单引号的区别

来源:互联网 发布:济南网络广告公司 编辑:程序博客网 时间:2024/06/09 12:12

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

双引号会执行 如 $name = 'hello'; echo "the $name"; 会输出 the hello 

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

这是主要区别

原创粉丝点击