I have just written my first php script and now have a dynamic table updated from MySql. The table contains a sequence of numbers which are sometimes zero.
Is there a neat way to ECHO a space or – character when there is a 0 to make the table look more elegant? The best I can do is with an IF ELSE construct:
Thanks
Is there a neat way to ECHO a space or – character when there is a 0 to make the table look more elegant? The best I can do is with an IF ELSE construct:
Code:
//Present code <td><?php echo $row_Recordset1['Price02']; ?></td> .. <td><?php echo $row_Recordset1['Price10']; ?></td> //best I can do <td><?php if ($row_Recordset1['Price02'] == 0) {echo “-“;} else {echo $row_Recordset1['Price05']; }?></td> .. <td><?php if ($row_Recordset1['Price10'] == 0) {echo “-“;} else {echo $row_Recordset1['Price05']; }?></td>
Comment