March 5, 2012
How can i call a sub_page.php inside a div container of my main_page.php?
Question by Lucas Matos
I need to show the content of one of my sub_page.php inside my main_page.php
At the moment im using an iframe to do that, but i would like to show the sub_page.php inside a div, so it will have a more professional look.
How can i do that?
<HTML>
<HEAD>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
</HEAD>
<BODY>
<div style="text-align:center;"><img src="faq-banner.png" /></div><br />
<div>
<?php include("faq.php"); ?>
</div>
</BODY>
</HTML>
Answer by Starx
Inside the div, include the php page with simple include()
command.
<div>
<?php include("subpage.php"); ?>
</div>