php比较加赋值语句

$a=-2;
if ($a < 0 && $a = 1) {
echo $a;
}

输出1

右面的$a=1可不是条件哦,而是赋值

posted on 2015-10-19 16:16  liuwenbohhh  阅读(412)  评论(0编辑  收藏  举报