To find odd or even row for different purpose. For one example:
Here we used this concept for two different types of colors filled in TR tag of html.
Example Code:
//for displaying status in table
$sqlquery="SELECT backup_date, backup_status FROM backup_history where backup_date >
'$fromDate' and backup_date<='$toDate' and mach_oid='$machine_oid' order by backup_date desc";
$sqlresult=mysql_query($sqlquery,$Link);
$sqlnum=mysql_num_rows($sqlresult);
$sqlrowno=1;
$loopvar=0;
?>