If you like the alternating table backgrounds that are in applications like iTunes, and want them in your web application, there is a simple way to do so in PHP:
<table>
<tr class="title">
<td></td>
</tr>
<?php
$i=0;
foreach($row as $r){
if($i&0){$alt=' class="even"';}else{$alt='';}
echo "<tr".$alt.">";
//other table stuff in here
$i++;
echo "</tr>";
}
?>
</table>
These days, I consider the failure to use version control a professional malpractice. I’m also a zealot when it comes to deleting dead code. In fact, I derive quite a bit of enjoyment out of deleting existing code. Unused code, old code, mockups, things that were started and never finished, things that someone thought they needed and never did—I’m delighted to delete them all.
Quoting from the latest PHP|Architect (August 2008) article, I found Jeff Moore’s writing insightful as well as helpful. A strong contender for clean code, he suggests deleting stranded, dead, or depreciated codeblocks. As far as his suggestion for version control, I would completely agree. I maintained/wrote an entire project without version control (along with two other developers), and I sincerely hope that I never have to do that again. It was a total disaster. FTP overwrites, deleted code that had dependancies, and no way to roll back equalled extreme project management headaches.
My Advice: Use Version Control. Period.
Instead of serving your web design / programming needs in the rolling hills of Wisconsin, we’re now available in the Statesville, Mooresville, Charlotte, and greater Piedmont area. Look us up if you get a chance!