How to write this if statement in PHP

Source: Internet
Author: User

  
   
  
           
  
          
  
           

目前还没有设置分类

This code, I want to implement when $i%4==0, executes the statement and then executes when $i%2==0

How do you write the IF statement for PHP?
Some of the answers I tried, the procedure was wrong.

And then I changed it.


  
   
  
    
  
   
  
           
  
          
  
           

目前还没有设置分类

And then it's right.

But this is too ugly to write, I hope the great God help me to change, change to if Else statement, do not delete other sentences, the DA ~

Reply content:


  
   
  
           
  
          
  
           

目前还没有设置分类

This code, I want to implement when $i%4==0, executes the statement and then executes when $i%2==0

How do you write the IF statement for PHP?
Some of the answers I tried, the procedure was wrong.

And then I changed it.


  
   
  
    
  
   
  
           
  
          
  
           

目前还没有设置分类

And then it's right.

But this is too ugly to write, I hope the great God help me to change, change to if Else statement, do not delete other sentences, the DA ~


  
               
  
   


  
      
  
       
  
       

目前还没有设置分类


  
      
  
       
  
       

目前还没有设置分类

Read the upstairs to write more than the php label of a good complex, in fact, like this simple php and html template with the use of the direct, echo Ah, the php code is simple and easy to understand


  
   目前还没有设置分类";    } ?>

if ($i % 2 === 0):    echo '';elseif ($i % 4 === 0):    echo '';else:    echo '

目前还没有设置分类

';endif;

-block" style="clear:both;">       
  
          
  
           

目前还没有设置分类

Using PHP instead of syntax


  
       
  
   
  
   


  
   目前还没有设置分类';?>
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.