help - I do not know how to do a multiple if statement
Posted: Thu Jun 02, 2005 5:17 am
Hi,
I have an if statement which works below;
However tis does not work. I need to add a fourth if;
Please help
I have an if statement which works below;
Code: Select all
for($i = 0; $i < $numofrows; $i++) {
$row = mysql_fetch_array($result); //get a row from our result set
$stopped = $row['stopped'];
$void = $row['title'];
if($stopped =='yes'){
echo "<TR bgcolor=\"#C1FFD1\">\n";
}
else if($i % 2) {
echo "<TR bgcolor=\"#ffff99\">\n";
}
else {
echo "<TR bgcolor=\"#ffffcc\">\n";
}However tis does not work. I need to add a fourth if;
Code: Select all
for($i = 0; $i < $numofrows; $i++) {
$row = mysql_fetch_array($result); //get a row from our result set
$stopped = $row['stopped'];
$void = $row['title'];
if($stopped =='yes'){
echo "<TR bgcolor=\"#C1FFD1\">\n";
}
if($void =='VOID'){
echo "<tr bgcolor=\"#FFCCCC\">\n";
}
else if($i % 2) {
echo "<TR bgcolor=\"#ffff99\">\n";
}
else {
echo "<TR bgcolor=\"#ffffcc\">\n";
}Please help