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

Popular posts from this blog

Issues changing the value of an element in an array in matlab -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

vb.net - Alternative to the T-SQL AS keyword -