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

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

WBOY
Release: 2016-06-13 13:28:52
Original
804 people have browsed it

这种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";

or

if($true){
 echo "true";
}else{
 echo "false";
} <div class="clear">
                 
              
              
        
            </div>
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template