<table>
<?php
    //debug($tabledata);
    foreach($tabledata as $line) {
        echo '<tr>';
        foreach($line as $cell) {
            echo '<td>' . $cell . '</td>';
        }
        echo '</tr>';
    }

?>
</table>