* @version 1.0.3 * @link http://aidanlister.com/repos/v/function.mysql_draw_table.php * @param array $result The result of a mysql_query * @param string $null Text to replace empty values with */ function mysql_draw_table($result, $null = ' ') { // Sanity check if (!is_resource($result) || substr(get_resource_type($result), 0, 5) !== 'mysql') { return false; } $out = "
| ' . mysql_field_name($result, $i) . ' | '; } $out .= "
|---|
| ' . $value . ' | '; } $out .= "