Trying to learn PHP from a book and I swear I'm going balder by the minute!!
Anyway heres my predicament;
I want to display some simple incrementing data from a PHP loop within a table. So that each cell within the table displays a different value ie. cell 1 displays '1' cell 2 displays '2'
using a simple 'for' statment
for ($i=1;$i<10;$i++)
I either try
<table>
<tr>
<th>Numbers</th>
</tr>
<tr<?php for ($i=1;$i<10;$i++)?> >
<td><?php echo $i?></td>
</tr>
</table>
and end up with the last number on it's own
or
<table>
<tr>
<th>Numbers</th>
</tr>
<tr<? >
<td><?php for ($i=1;$i<10;$i++) echo$i ?></td>
</tr>
</table>
I just end up with all the values displayed in one cell
Am I not puttin the </td> tags in the right place, any help would be much appreciated?