<?php 

//table helper

public function table($data, array $headers = array(), array $options = array()) {
	//Create the table 
	echo '<table>\n';
	echo '<tr>';
	foreach ($headers as $k => $v) 
	{
		echo "<th>$v</th>"
	}
	echo "</tr>\n"


	foreach ($data as $item)
	{
		echo '<tr>'
		foreach($header as $key => $value)
		{
			echo "<td>$data->$key</td>\n"
		}
		echo "</tr>\n"
	}
	echo "</table>"
}
?>