Need help with elseif statement
Posted: Fri Sep 10, 2010 1:16 pm
My Code is below. For some reason the field STATUS_BYTE has a value of "F", but when the program goes through the elseif statements it executes through the "" but once it gets to the "C" it stops and displays that as the output... It should recgonize "F" as the correct choice but doesn't.. Any help would be appreciated.
Code: Select all
<?
if($myrowvia2['STATUS_BYTE'] = "")
{
?>
<TD bgcolor=<?=$chgc?> width="20%"><?=$fontcall3?><? echo 'OPEN' ?></TD>
<?
}
elseif($myrowvia2['STATUS_BYTE'] = "C")
{
?>
<TD bgcolor=<?=$chgc?> width="20%"><?=$fontcall3?><? echo 'CANCELLED' ?></TD>
<?
}
elseif($myrowvia2['STATUS_BYTE'] = "F")
{
?>
<TD bgcolor=<?=$chgc?> width="20%"><?=$fontcall3?><? echo 'COd' ?></TD>
<?
}
elseif($myrowvia2['STATUS_BYTE'] = "P")
{
?>
<TD bgcolor=<?=$chgc?> width="20%"><?=$fontcall?><? echo 'PROBLEM' ?></TD>
<?
}
elseif($myrowvia2['STATUS_BYTE'] = "R")
{
?>
<TD bgcolor=<?=$chgc?> width="20%"><?=$fontcall?><? echo 'REOPENED' ?></TD>
<?
}
elseif($myrowvia2['STATUS_BYTE'] = "S")
{
?>
<TD bgcolor=<?=$chgc?> width="20%"><?=$fontcall?><? echo 'CLOSED' ?></TD>
<?
}
?>