I have solved it through a sort of nested loop. print '<table width="600" border="0" cellspacing="0" cellpadding="0"><tr>'; $x = 0; while ($x < $colcnt) { $coltitle = mysql_result($prccols,$x,"colhdr"); print '<td>'.$coltitle.'</td>'; $x++; } print '</tr>'; $i = 1; while ($i <= $pricing_details) { print '<tr>'; $c=0; while ($c < $colcnt) { print '<input type="hidden" name="tourtype" value="'.$tourtype.'">'; print '<input type="hidden" name="tour_id" value="'.$tour_id.'">'; print '<input type="hidden" name="tourid[]" value="'.$tour_id.'">'; print '<td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">'; print '<input type="text" name="prcdet[]" size="20">'; print '</b></font></td>'; $c++; } Print '</tr>'; $i++; } print '</tr></table>'; Thanks anyway. Alp "Alp" <alp.bekisoglu@xxxxxxxxxxxxxx> wrote in message news:20050205114316.89520.qmail@xxxxxxxxxxxxxxxx > Hi experts, > > Here's the scenario: > - 3 lines of data is present in a table > - 2 lines of detail lines (corresponding to the above) are needed to be > entered into a second table > > Result needed is: > table1line1 table1line2 table1line3 (as column headers) > table2line1 table2line2 table2line3 (as first line of detail) > table2line4 table2line5 table2line6 (as second line of detail) > > I might be in a wrong approach in accomplising this and would highly > appreciate any corrections. In short, column header data is entered into a > table, then number of detail lines are obtained (in general, i.e. 2), the > display should show 2 lines of input boxes under each header text in the > browser for data entry into these detail lines. > > Clear as mud? Its getting there for me slowly... > > Thanks in advance. > > Alp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php