In PHP, you have functions like inlude("
filename"); and require("
filename"); which will do this job. If you want you can use the following code:
Your Home page:
Quote:
<div>
<?php include("post.php"); ?>
</div>
|
If you want only some specific elements from the post.php page, you shuld first declare them as php variables and print their values
Post.php
Quote:
<?php
$heading1 = "<h1>Some text</h1>";
$heading2 = "<h1>Some text</h1>";
$heading3 = "<h1>Some text</h1>";
?>
|
Home.php
Quote:
<div>
<?php
include("post.php");
echo $heading1;
echo $heading2;
echo $heading3;
?>
</div>
|