Alternating Color PHP Thinger

Sassy sent me some help for: : “$color = ( $counter % 2 == 0 ) ? $colorOne : $colorTwo; ” — it uses the modulo operator, described .

Thanks Sass!

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This post accepts webmentions. If you link to and write about this on your website, enter the web address of your post below: