This is a C program that generates an HTML page with a table populated from an SQL query.

Here is the same thing in PHP which produces the same output.

<html><body><table>
<?php
  mysql_connect('host','user','passwd') or die(mysql_error());    
  $res = mysql_db_query('my_db','SELECT * FROM my_table') 
         or die(mysql_error());
  while(($row = mysql_fetch_row($res))) {
      echo '<tr>';
      for ($i=0 ; $i < mysql_num_fields($res); $i++) 
          echo "<td>{$row[$i]}</td>\n";
      echo '</tr>';
  }
?>
</table></body></html>