php 中单引号和双引号的区别

来源:互联网 发布:c语言自学步骤 编辑:程序博客网 时间:2024/05/15 15:36
单引号内部的变量不会执行,双引号会执行
eg:

1、双引号

$name = 'hello';

echo "the $name";

会输出 the hello

2、单引号

$name = 'hello';
echo 'the $name';

会输出 the $name
0 0
原创粉丝点击