The following code sample will add an ‘altrow’ class to every alternative row in a table with a minumum overhead. The code produced is compatible with the default cake.generic.css stylesheet: <?php foreach ($upcoming_events as $i=>$event) { ?> <tr<?php echo ($i…