I have a table of data that is generated dynamically based on the contents stored in a mysql database.
This is how my code looks:
-
2021-01-12 07:28
This is how I did it. I declared a css class called "even" with all the styling i wanted. Then looped through the scenario. Hope it helps!
";
$i = 0;
while($row = mysql_fetch_array($result))
{
if($i%2 == 0)
{
echo "";
echo "" . $row['something'] ." ". $row['something'] . " | ";
echo "
";
}
else
{
echo "";
echo "" . $row['something'] ." ". $row['something'] . " | ";
echo "
";
}
$i++;
}
echo "
";
mysql_close($con);
?>