Zebra Stripe Counting PHP shorthand


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php $count; while ( have_posts() ) : the_post(); $count++; $zebra = ($count % 2) ? ' odd' : ' even'; ?>
  2.  
  3. <?php endwhile; // End the loop ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.