Odd or Even in PHP/MySQL

sdloanguy

New Member
I want to ask how to set odd or event in mysql->php output. I can do this with that code:\[code\]if($i%2 == 0){ $class = 'content';}else{ $class = 'contents';}echo "<tr class='$class'>...\[/code\]...but if i remove manual a row in the mysql things at output get messed. I'm thinking some way with foreach...or something like that. Any help will be superb.
 
Back
Top