So here is what I am thinking.
A function page that would handle all the boring HTML formatting.
and a page where I would pass the arguments for the formatting of the HTML, including the output text.
This would help in the fact that I could just include the functions in all the PHP scripts without having to type all the HTML behind it.
This is what I have so far:
<?php
function.inc.php
function body($bgColor)
{
echo "<body bgcolor='$bgColor'>";
}
function table($tableAlign,$tableBorder,$tableWidth)
{
echo "<table align='$tableAlign' border='$tableBorder' width='$tableWidth'><tr>";
}
function td($tdAlign,$tdWidth,$fontFace,$fontSize,$fontColor,$tdData)
{
echo "<td align='$tdAlign' width='$tdWidth'><font face='$fontFace' size='$fontSize' color='$fontColor'>$tdData</td>";
}
function close()
{
echo "</tr></table>";
}
html.output.php
body('#000000');
table('left','1','50%');
td('center','50%','Verdana','3','#FFFFFF','This is a test');
close();
Have any of you folks done this or have any better ideas?
Thanks for the help.
~az