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?

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />   
<div style="text-align:center;"><img src="faq-banner.png" /></div><br />
<?php include("faq.php"); ?>

Answer by Starx

Inside the div, include the php page with simple include() command.

<?php include("subpage.php"); ?>

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+


Please fill the form - I will response as fast as I can!