By sleddoggin on
Hello,
I'm trying to alternate the ID of rows in the forums. This is the PHP code I've developed thus far, but it isn't working. Am I missing something? Thanks!
$setrow='rowodd';
for($table as $row)
{
if($setrow=='rowodd') {
$setrow='roweven';
}else{
$setrow='rowodd';
}
print $setrow; ">
}
Comments
Although this doesn't work
Although this doesn't work either (blank page), would this be a better way to format?
$setrow='rowodd'; for($table as $row);if ($setrow=='rowodd'):$setrow='roweven';else:$setrow='rowodd';endif;<div class="forum-post-wrapper" id="<?php print $setrow; ?>">There is a variable $zebra
There is a variable $zebra that you can use, it has the values 'odd' or 'even'.
Thanks!
Thanks!