Home >Backend Development >PHP Tutorial >这种PHP代码风格对不对啊解决思路

这种PHP代码风格对不对啊解决思路

WBOY
WBOYOriginal
2016-06-13 10:26:08929browse

这种PHP代码风格对不对啊
if($true): echo "true";
else echo "false";
endif;
?>
 
这个对不对啊,居然是在PHP手册上看到的啊
我迷惑的很 我测的好像不对,但是到底对不对啊

------解决方案--------------------
if($true): echo "true";
else: echo "false";
endif;
------解决方案--------------------
会用简化版的就可以了:

PHP code
if($true) echo "true";else echo "false";orif($true){ echo "true";}else{ echo "false";}<div class="clear">
                 
              
              
        
            </div>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn