shadowline
The include command is very similar to using an SSI include. It calls a block of information from a different page into the current webpage.

include ("filename.php");

Include will pass the information from an external page into the current one. The information that is passed will be known and usable to the coding that appears after the include command. Coding that appears before the include command will not "know" about the information contained in the included file.

info.php
<?php
$color = "yellow";
$fruit = "bananas.";
?>

test.php
<?php
echo "I like $color $fruit <br>";
include ("info.php");
echo "I like $color $fruit <br>";
?>

Results :
I like
I like yellow bananas.

One of the many uses of includes is to set common webpage areas into seperate files and include them into each page like a template style layout. This site uses php includes. One for the main header area, one for the navigations, and one for the footer area.

Another benefit to using includes would be to include a specific file IF a condition is true ELSE a different one upon a false condition.
shadow

Advertise in the banner along the top, Click here!

Valid XHTML 1.0 Transitional Valid CSS! Text Link Ads
shadow
shadow