Forum Moderators: coopster

Message Too Old, No Replies

display multiple pages in single file.

I got each of this pages work individually but when i try to display both f

         

dewteks

6:23 pm on May 1, 2008 (gmt 0)

10+ Year Member



Hi all,
I have a challenge with php and would appreciate the support of the forum in cracking this nut. I need to display the output of two .php ( news.php and products.php) files in a single file say catalog.php.

I got each of this pages work individually but when i try to display both files inside a table (using the <td> </td> tag)in a third file , the files appear above each other instead of being on a single row.

below is my structure, please what do i need to make the pages appear side by side on a row

<?
<table>
<tr>
<td> include "products.php" </td>
<td> include "news.php" </td>
</tr>
</table>
?>

thanks for your support.

BandonRandon

6:41 pm on May 1, 2008 (gmt 0)

10+ Year Member



my frist question whould be are you using the "echo" tag to echo out the html? that would mean doing something like <?php echo("<table>"); and stuff.

Either that or use inline php such as having the table in html and then <?php include ("filename"); ?> then go on with the table.

I don't know if that helps at all but that's my first thoughts.

Brandon

dewteks

7:13 pm on May 1, 2008 (gmt 0)

10+ Year Member



Yes, the script ran without error. i just threw out the echo and other php related stuff. its not a syntax error thing but i think i cant just get the page properly formated

I actually want the two pages to be on thesame row i.e side by side rather than on top of each other.

thank

bubbasheeko

5:00 am on May 2, 2008 (gmt 0)

10+ Year Member



What you have is close....try:

<table>
<tr>
<td><? include('products.php'); ?></td>
<td><? include('news.php'); ?></td>
</tr>
</table>

There would be no reason, that I see, why the above would not appear on the same row. Unless there is a formatting problem with the surrounding code.

dewteks

8:56 am on May 8, 2008 (gmt 0)

10+ Year Member



hi, tot i have closed this thread
I got it to work by removing the html tags in the news and product files.
the created a table in the third file, inside of which i used the include function to call the product and news.php.
thanks