Alternate Colors in Rows
| From: | Steve Marquez | Date: | Wed, 03 Oct 2007 18:44:29 +0000 |
| Subject: | Alternate Colors in Rows | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-262700@lists.php.net to get a copy of this message | ||
Greetings,
I am attempting to alternate the colors of the container DIV. Anyone know
how to do this?
<?php
$study_title = stripslashes($study_title);
$study_title = nl2br($study_title);
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
extract ( $row );
print "
<div id=\"e_options_container\"
style=\"background-color:#333366;\">
<div id=\"e_options\" style=\"width: 100px;
\">$optone</div>
<div id=\"e_options\" style=\"width: 50px; \"><a
href=\"$edit_item\">Edit</a></div>
<div id=\"e_options\" style=\"width: 50px; \"><a
href=\"$delete_item\" onclick=\"return confirm('Are you sure you want to
delete?')\">Delete</a></div>
<div id=\"e_options\" style=\"width: 250px;
\">$study_title</div>
<div id=\"e_options\" style=\"width: 75px;
\">$date</div>
</div>";
}
?>
Thank you very much,
--
Steve M.