I am working on this below php page and I am trying to include font awesome class when there is a certain condition met. But, getting the below error.
Parse error: syntax error, unexpected 'if' (T_IF), expecting ';' or ','
here is the code
foreach($result as $row) {
echo '<tr>
<td>' if(.$row["FLAG"]=="1") { '<i class="fa-sharp fa-solid fa-flag-pennant"></i>';}.'</td>
<td>'.$row["CREATEDDATE"].'</td>
<td>'.$row["ID"].'</td>
<td>'.$row["CUSTOMER_NAME"].'</td>
<td>'.$row["VEHICLENO"].'</td>
<td>'.$row["SERIAL"].'</td>
</tr>';
}