I have a table displaying results from a SQL query.
However, for some exceptional rows (where SOURCE="ABC"), I would like the data to be retrieved a different table.
Is it better to have an IF that checks the SOURCE and then print the row with each data accordingly? Or is it better to have multiple IFs in each box and keep on checking if SOURCE="ABC" and then display data from either one or the other table?
This is part of the current code, where IFs are not implemented yet:
<td><?php echo date("D, d M Y", strtotime($val['date'])); ?></td>
<td><?php echo $val['firstName']." ".$val['lastName']; ?></td>
<td align="center"><?php echo $val['city'].", ".$val['state']; ?></td>
<td bgcolor="<?= $bg ?>" align="center"><?php echo $val['status']; ?></td>
<td align="center"><?php echo strtoupper($val['source']); ?></td>