PHP中的IF也可以这么用
PHP中的IF也可以这样用啊if(条件): do someting ;
不加:可以么 分享到:
------解决方案--------------------
http://www.php.net/manual/en/control-structures.alternative-syntax.php
------解决方案--------------------
if(condition):
....
end if;
可以这样写
------解决方案--------------------
是这样
if(condition):
...
endif;
------解决方案--------------------
替代语法,手册中有提到的
------解决方案--------------------
嗯 替代语法
if(condition):
dosomething;
endif;
while(conditon):
dosomething;
endwhile;
...........
PHP之友评论