<?php
$s = array(
array("title" => "aaa", "price" => 65.50),
array("title" => "bbb", "price" => 923.00),
array("title" => "ccc", "price" => 87.99),
array("title" => "ddd", "price" => 7.35)
);
?>
<?php if (count($s) > 0): ?>
<table border=1 cellspacing=0 cellpading=0>
<thead>
<tr>
<th><?php echo implode('</th><th>', array_keys(current($s))); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($s as $row): array_map('htmlentities', $row); ?>
<tr>
<td><?php echo implode('</td><td>', $row); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>