View Single Post
Old 08-24-2004, 05:44 PM   #3 (permalink)
idx
Senior Grasshopper
 
idx's Avatar
 
Join Date: Jun 2003
Location: FL
Posts: 317
idx is on a distinguished road
I typically do the same - although I'll just assign the row a class value while looping through an array of result objects.

PHP Code:
<?php
   $i 
0;
   foreach (
$results as $k => $v) {
      if (++
$i%2$row='oddrow'; else $row='evenrow';

?>

  <tr class="<?=$row;?>">
     <td><?php $v->p('field1'); ?></td>
     <td><?php $v->p('field2'); ?></td>
  </tr>

<?php
   
}
?>
idx is offline   Reply With Quote