Return to Snippet

Revision: 20071
at November 6, 2009 05:11 by ReeceMarsland


Initial Code
$count = 0;
 foreach ($images as $image) {
   $count++;
   $odd_even = ceil($count);
    if ($odd_even % 2) {
      $class = 'odd';
    } else {
      $class = 'even';
    }
      $content .= '<li class="'.$class.'">'; 
  }

Initial URL

                                

Initial Description

                                

Initial Title
Odd and Even classes

Initial Tags
css, php

Initial Language
PHP