PHP中的IF也可以这样用啊
程序员文章站
2022-05-03 09:55:12
...
if(条件): do someting ;
不加:可以么
可以这样写
可以这样写
是这样
可以这样写
是这样
手滑了...
可以这样写
是这样
不加:可以么
回复讨论(解决方案)
if(条件) do someting;
加了反而是错的
http://www.php.net/manual/en/control-structures.alternative-syntax.php
你那里看到的 好要加:?
什么书啊 真是误人子弟
伪代码?
是不是某种框架里的写法?哈哈哈
if(condition):....end if;
可以这样写
if(condition):....end if;
可以这样写
是这样
if(condition):...endif;
if(condition):....end if;
可以这样写
是这样
if(condition):...endif;
手滑了...
飞过~~~~
if(condition):....end if;
可以这样写
是这样
if(condition):...endif;替代语法,手册中有提到的
嗯 替代语法
if(condition):
dosomething;
endif;
while(conditon):
dosomething;
endwhile;
...........
上一篇: 一个开发人员眼中的JSP技术_MySQL
下一篇: 获取操作系统