Hi Friends,
i have page with few options. i need to generate multiple rows in page dynamically. in single row i have three labels and three select boxes,
i need to get the number of row to be generated from user and need to generate those. Anyone can help in this issue?
Thanks,
Srikanth
You can use a loop to create those rows.
[PHP]$myTableRows;
for($i = 0; $i<$nbOfRows; $i++) {
$myTableRows .= '<tr><td><label for="1">L1</label><input id="1" type="checkbox" /></td><td><label for="2">L2</label><input id="2" type="checkbox" /></td><td><label for="3">L3</label><input id="3" type="checkbox" /></td></tr>';
}
// Further....
echo '<table><thead><th><td>Column 1</td><td>Column 2></td><td>Column 3</td></th></thead><tbody>'.$myTableRows.'</tbody></table>';
[/PHP]