PHPFront

Home > PHP > Alternating row colors
The PHP website created by its users!



Alternating row colors


Author
DescriptionAlternate your row colors making it easier for your users to read your site. You will need to place this code inside a loop for it to work.
RatingThis script has been rated 4/5 (8 votes)

PHP Code


            if($i=='1') {
                echo('<div style="background-color: #ffffff;">content here</div>');
                $i = '2';
            }else{
                echo('<div style="background-color: #f1f1f1;">content here</div>');
                $i = '1';

            }



Rate it: Print Print

Comments


No comments posted yet.

Name
Website
Your comment