Easiest way to alternate row colors in PHP/HTML?

前端 未结 19 1932
無奈伤痛
無奈伤痛 2020-12-01 03:41

Here\'s a PHP example of mine. Can anyone find a shorter/easier way to do this?


    
19条回答
  •  萌比男神i
    2020-12-01 04:29

    If you'd like to have less in-line PHP, a great way of doing it is via JavaScript.

    Using jQuery, it's simply:

    
    

提交回复
热议问题