Problem with Alignment using PHP INCLUDE
Posted: Wed Sep 10, 2008 12:09 pm
I have two separate files which I would like to include to my main index page.
buyTickets.php
<table width="200" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><img src="images/buyTickets.jpg" width="200" height="21" /></td>
</tr>
//..... more codes after this removed....
</table>
and
promotions.php
<table width="200" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><img src="images/promotions.jpg" width="200" height="21" /></td>
</tr>
// more codes after this removed....
</table>
I tried to place them one on top of the other in the following line:
index.php
// HTML tags above this line....
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0" class="style1">
<tr>
<td width="210" valign="top"><?php include ("includes/buyTickets.php");?><br /><?php include ("includes/promotions.php");?></td>
// more codes after this removed....
However, it seems like the <br /> is not working well. No matter how many <br /> or <p> I insert between the includes, the alignment just won't work.
Can I include php files in this way? The two files, buyTickets.php and promotions.php do not have the FULL HTML code. They simply contain the <TABLE> .... </TABLE> HTML code. However, my index.php has the FULL HTML code. the <HTML><HEAD> etc are all above the <TABLE....> tag.
I really need some advise on how I can properly include external files. Thanks
buyTickets.php
<table width="200" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><img src="images/buyTickets.jpg" width="200" height="21" /></td>
</tr>
//..... more codes after this removed....
</table>
and
promotions.php
<table width="200" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><img src="images/promotions.jpg" width="200" height="21" /></td>
</tr>
// more codes after this removed....
</table>
I tried to place them one on top of the other in the following line:
index.php
// HTML tags above this line....
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0" class="style1">
<tr>
<td width="210" valign="top"><?php include ("includes/buyTickets.php");?><br /><?php include ("includes/promotions.php");?></td>
// more codes after this removed....
However, it seems like the <br /> is not working well. No matter how many <br /> or <p> I insert between the includes, the alignment just won't work.
Can I include php files in this way? The two files, buyTickets.php and promotions.php do not have the FULL HTML code. They simply contain the <TABLE> .... </TABLE> HTML code. However, my index.php has the FULL HTML code. the <HTML><HEAD> etc are all above the <TABLE....> tag.
I really need some advise on how I can properly include external files. Thanks