Page 1 of 1

table

Posted: Wed Mar 17, 2004 11:37 am
by allelopath
What's the best way to implement a html table in PHP?

There's this: http://www.mamasam.com/index3.html
but i can't find where to get it (they give a reference, http://cvs.php.net, but i don't see it there)

Posted: Wed Mar 17, 2004 12:43 pm
by d3ad1ysp0rk
PHP just processes things. You can easily echo out tables the same way you'd just write them, since you're echoing out the HTML for the browser to read.

Code: Select all

<?PHP
echo <<<EOT
<table width="300" height="200">
<tr>
<td valign="top">row1 - col1</td>
<td valign="top">row1 - col2</td>
</tr>
<tr>
<td valign="top">row2 - col1</td>
<td valign="top">row2 - col2</td>
</tr>
</table>
EOT;
?>

Posted: Wed Mar 17, 2004 4:23 pm
by allelopath
ok thanks,
i didn't know about the EOT before, but now i do.