码迷,mamicode.com
首页 > 其他好文 > 详细

需要记一下的

时间:2014-09-01 10:44:12      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:c   text   as   r   class   false   需要   hello   区别   

$a=false; $a=""; $a=0;
$b=false;
echo $a==$b?"true":"false";

单引号和双引号的区别:

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


$name = ‘hello‘;
echo "the $name";

会输出 the hello

而如果是单引号

$name = ‘hello‘;
echo ‘the $name‘;

会输出 the $name

需要记一下的

标签:c   text   as   r   class   false   需要   hello   区别   

原文地址:http://www.cnblogs.com/happydd/p/3948692.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!