How would you go about printing the results of foreach of an array, alternating the color of HTML between gray and white for each line. For example
foreach $p_category (@p_categories){
print "<tr><td bgcolor=\"gray\"> my results line 1 </td></tr>";
}
That's simple enough for all the results with a gray background but how to alternate?
foreach $p_category (@p_categories){
print "<tr><td bgcolor=\"gray\"> my results line 1 </td></tr>";
}
That's simple enough for all the results with a gray background but how to alternate?