Include function in PHP copy all the contents of one PHP file in other PHP file. Once you include a file then all the variable of include file inherits the variable scope of the line on which the include occurs and can be used after this line. Include function is very help full when you want to use same type of contents in more then pages in the same way.
For example if you have a file which have some content and you want to use these content in other file then you have two way first you copy the content and past in new file and other method is use include function. with including all the content of that file is become part of new file. This will help developers to make it easy to change the layout of complete website with minimal effort. If there is any change required then instead of changing thousand of files just change included file.
For example
if you have a common menu for your web site then make a file which contain some content of you menu and then just include on the top of you every file.
For Example if your menu file is menu.php then
when you want to include this file in new file then your code will be:
from this point new file begin
Variables in PHP
PHP Concatenation
Calculation in PHP
If Statements in PHP
if ... else Statements in PHP
Nested IF Structure in PHP
PHP Comparison Operators
Switch Statement in PHP
Logical Operators In PHP
PHP Booleans
FOR Loop in PHP
While Loop In PHP
foreach Loop In PHP
Break Statement
Array In PHP
Associative Array
The Count function
Changing Case Function
Trim Function In PHP
Str_shuffle( ) function
strpos function in PHP
Explode() Function in PHP
Function
Passing Function Arguments
Server Variables
Header Function
Include Function
The require Function