I wish to make a dynamic HTML table from a mysql query . Have read about
PHP array -
| SitePoint Sponsor |
I wish to make a dynamic HTML table from a mysql query . Have read about
PHP array -
I'm not exactly sure what you're asking... but here is one way to do it with PHP:
PHP Code:$result = mysql_query("SELECT id, name, salary FROM employees", $conn);
while (list($id, $name, $salary) = mysql_fetch_row($result)) {
echo " <tr>\n" .
" <td><a href=\"info.php?id=$id\">$name</a></td>\n" .
" <td>$salary</td>\n" .
" </tr>\n";
}
------------------------------------
http://www.maveglobal.com
http://www.elefoo.com
http://www.mitoblog.org
Bookmarks