How to give alternating table rows different background colors using PHP

前端 未结 6 495
面向向阳花
面向向阳花 2021-01-12 07:14

I have a table of data that is generated dynamically based on the contents stored in a mysql database.

This is how my code looks:

6条回答
  •  清酒与你
    2021-01-12 07:24

    ";
    
    ?>
    

    It basically checks to see if $x is divisible evenly by 2. If it is, it is even.

    P.S. if you haven't seen that style of if else query, it is called a ternary operator.

提交回复
热议问题