I have the following query:
$qrysel = "select * from pack";
$ressel = mysqli_query($db, $qrysel);
$obj = mysqli_fetch_object($ressel);
In html I have this:
<?= $obj['pack_name']; ?>
How could I make it show the value according to a given id, without using WHILE
and without putting WHERE
in the query ...
Is it possible to set WHERE
directly in the html obj?
Table:
<table>
<tbody>
<tr>
<td>item 1</td>
<td>item 2</td>
<td>item 3</td>
</tr>
<tr><td> </td></tr>
<tr>
<td>item 4</td>
<td>item 5</td>
<td>item 6</td>
</tr>
</tbody>
</table>
If I were to use the while it would repeat all TDs then I need them to be displayed as above.
There are exactly 6 records in this table.