I am trying to figure this out and want to eventually convert all my sites to PHP. My first task is to make a table that I can stick into the main page of one of my sites and then start moving everything in that direction (templatize) and since I am dense it makes for all the more fun
I use the same basic table structures throughout the site and want to start there. I'm a little confused about the approach so maybe someone could offer a better way. Starting with a table array that I can call text include files into or from:
<?PHP tables.php
$main = array (
*// this is obviously the beginning of nested tables
shell=>"<p><TABLE cellspacing='0' cellpadding='0' width='100%' align='center' border='0'><tr><td><TABLE cellspacing='1' cellpadding='1' align='center' border='0' bgcolor='#036501' width='100%'><tr><td align='center' bgcolor='#ECFFEC'>",
*//Can I put a reference to a text file in headtext?
headtext=>"<span class='redflshbg'>Juniors, Seniors Baseball Try Out Information</span></td></tr>",
*//Same question, can I put a reference to a text file in bodytext?
bodytext=>"<tr><td bgcolor='#FFFFFF' class='grnbxlg'><div align='center'>Starts Saturday February 28th<br>Kent<p>TRY OUT TIMES:</span><ul><li></li></blockquote></div>",
*//What about these line items should they be separate text include files?
shellEND=></td></tr></TABLE></td></tr></TABLE>
);
?>
Then in the HTML file I would have:
<body>
<?
include 'tables.php';
echo $main[shell][headtext"headtextfile1.txt"][bodytext"bodytextfile1.txt"][shellEND];
NOT SURE HOW TO DO THIS, IS WHAT I DID RIGHT?: calling the table and text files
?>
OR
<?
include 'tables.php';
?>
I can see that you could maybe call an array (text files) from within the table array but not sure how. Does this make sense or am I going about this wrong?
Thanks in advance

I use the same basic table structures throughout the site and want to start there. I'm a little confused about the approach so maybe someone could offer a better way. Starting with a table array that I can call text include files into or from:
<?PHP tables.php
$main = array (
*// this is obviously the beginning of nested tables
shell=>"<p><TABLE cellspacing='0' cellpadding='0' width='100%' align='center' border='0'><tr><td><TABLE cellspacing='1' cellpadding='1' align='center' border='0' bgcolor='#036501' width='100%'><tr><td align='center' bgcolor='#ECFFEC'>",
*//Can I put a reference to a text file in headtext?
headtext=>"<span class='redflshbg'>Juniors, Seniors Baseball Try Out Information</span></td></tr>",
*//Same question, can I put a reference to a text file in bodytext?
bodytext=>"<tr><td bgcolor='#FFFFFF' class='grnbxlg'><div align='center'>Starts Saturday February 28th<br>Kent<p>TRY OUT TIMES:</span><ul><li></li></blockquote></div>",
*//What about these line items should they be separate text include files?
shellEND=></td></tr></TABLE></td></tr></TABLE>
);
?>
Then in the HTML file I would have:
<body>
<?
include 'tables.php';
echo $main[shell][headtext"headtextfile1.txt"][bodytext"bodytextfile1.txt"][shellEND];

?>
OR
<?
include 'tables.php';
?>
I can see that you could maybe call an array (text files) from within the table array but not sure how. Does this make sense or am I going about this wrong?
Thanks in advance

Comment