php - how to loop though an html table rows and put them in an array -
while($row=mysql_fetch_array($sqlquery)) { echo "<tr> <td>$row[name]</td><td> $row[number]</td><td> $row[mydatecol]</td><td>$row[mycheckboxcol]</td></tr>"; }
i trying learn basic php , populating html table rows database table code above.
now want on button submit convert data row values php array can manipulate. welcome.
an html table can't submitted, if want should work form. apart that, it's easier create array while fetching database rows, this:
while($row = mysql_fetch_array($sqlquery)) { $rows[] = array( 'name' => $row['name'], 'number' => $row['number'], 'mydatecol' => $row['mydatecol'], 'mycheckboxcol' => $row['mycheckboxcol'] ); }
Comments
Post a Comment