/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function getHtmlTable($result){ // receive a record set and print // it into an html table $out = '<table>'; $out .= "<th>".$aux."</th>"; } $out .= "<tr>"; foreach ($linea as $valor_col) $out .= '<td>'.$valor_col.'</td>'; $out .= "</tr>"; } $out .= "</table>"; return $out; }
URL: http://www.barattalo.it/2010/01/25/10-php-usefull-functions-for-mysql-stuff/