Parse error: syntax error, unexpected token “if” in
am trying to add color in my String if the String is equal to Approved the color is green and Disapproved the will be Red this my php code below:
<td>
‘.
if($row[“status2_ex”]==”Approved”){
echo “<span style=’color:green’><b>Approved</b></span>”;
}
elseif($row[“status2_ex”]==”Disapproved”){
echo “<span style=’color:red’><b>Disapproved</b></span>”;
}
else{
echo “<span style=’color:black’>NULL</span>”;
}
.’
</td>
Nick Balucan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.