Hi, I'm changing the color of the text in the table according to its value... if the value is "posted" then its color is blue if it's "cancel" it's red...
I have been able to achieve it using an if statement:
<td><span style="<?php if($value['posted'] == 'posted')echo 'color:blue'?>"><?php echo $value['posted']; ?></span></td>
When I add an ELSE IF for the cancel I figured out that it should look like this;
<td><span style="<?php
if($value['posted'] == 'posted')
{
echo 'color:blue'
}
else if($value['posted'] == 'cancel')
{
echo 'color:red'
}
?>">
<?php echo $value['posted']; ?></span></td>
But it's SYNTAX ERROR UnEXPECTED }
I know it's just a simple else if statement but I can't get it right. Please help...