Hello friends, I need a help. I know now to echo out a 1 column table to display my search result. but i need to echo out my result in a table of about 3 columns to display my catelogue. please what is the syntax for it.
regards
How to echo out 3 column table
Moderator: General Moderators
Re: How to echo out 3 column table
Code: Select all
<table cellspacing="0">
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
</tr>
<?php foreach ($result as $row): ?>
<tr>
<td><?php echo $row['1']; ?></td>
<td><?php echo $row['2']; ?></td>
<td><?php echo $row['3']; ?></td>
</tr>
<?php endforeach; ?>
</table>