Posted By

j4kp07 on 03/23/11


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

trusktr
j4kp07


Zebra Stripe Counting PHP shorthand


 / Published in: PHP
 

  1. <?php $count; while ( have_posts() ) : the_post(); $count++; $zebra = ($count % 2) ? ' odd' : ' even'; ?>
  2.  
  3. <?php endwhile; // End the loop ?>

Report this snippet  

You need to login to post a comment.