Inserting Files in PHP
Let's say we have one file:
<?php
echo 'index';
?>
Let's also say there is a second file:
<?php
echo 'test';
?>
Let's insert the contents of the second
file into the first one. This is done using the
include operator:
<?php
include 'test.php';
echo 'index';
?>
The same file can be inserted any number of times:
<?php
include 'test.php';
include 'test.php';
include 'test.php';
echo 'index';
?>
Create files file1.php, file2.php,
file3.php. Include them in your
main file.