Here is my problem,
I am extracting data from a MYSQL table and formatting it into a table.
But what I want is that the first row should be:
Code: Select all
<tr>
Code: Select all
<tr class='odd' >
Code: Select all
<tr>
Moderator: General Moderators
Code: Select all
<tr>
Code: Select all
<tr class='odd' >
Code: Select all
<tr>
Code: Select all
if ($i % 2) {
echo "$i is odd";
} else {
echo "$i is even";
}
Code: Select all
$i = 10;
if ( $i&1 )
{
echo "$i is odd";
}
else
{
echo "$i is even";
}True, but Aravinthan may need to support outdated browsers.McInfo wrote:There is also the pure CSS solution. http://www.w3.org/Style/Examples/007/evenodd