I have a table with three ligne and three column in a php page, I want to know how to not show a ligne when the value of data sent from the database is 0?
I have always data sent from the database to the 2 lignes in blue but for the red one there is not always data sent to this ligne, so I want to know how to hide this ligne when there is not a data sent from the database. The code that I have actually:
<table class="table-striped" id="">
<tr>
<th>Title 1</th>
<th>Title 2</th>
<th>Title 3</th>
<th>Title 4</th>
</tr>
<tbody>
<tr>
<td>
<?php echo $td1; ?>
</td>
<td>
<?php echo $td2; ?>
</td>
<td>
<ul>
<?php echo $td3; ?>
</ul>
</td>
<td>
<ul>
<?php echo $td4; ?>
</ul>
</td>
</tr>
<tr>
<td>
<?php echo $td5; ?>
</td>
<td>
<?php echo $td6; ?>
</td>
<td>
<ul>
<?php echo $td7; ?>
</ul>
</td>
<td>
<ul>
<?php echo $td8; ?>
</ul>
</td>
</tr>
<!-- the ligne bellow that i want to no show if the data sent is 0 -->
<tr>
<td>
<?php echo $td9; ?>
</td>
<td>
<?php echo $td10; ?>
</td>
<td>
<ul>
<?php echo $td11; ?>
</ul>
</td>
<td>
<ul>
<?php echo $td12; ?>
</ul>
</td>
</tr>
</tbody>
</table>