18 – PHP Include

0
63

This tutorial is all about PHP Include.
Even though you don’t have enough much understanding about the details of PHP, you have nothing to worry about because you can save yourself with the use of PHP include command.

 

Include command is used to get the file name and insert that file into the script that provide an include command. This method has the ability to lessen your working load and when updating you don’t have to update all the pages because you can simply make it on one page. For instance, a navigation file.

 

See Examples Below:

  • Create a file and name it “navigation.php“. After that, do the following codes as follows.

navigation.php Code:

  • Create a file and name it “index.php”. After that, do the following codes as follows.

index.php Code:

  • Create a file and name it “about.php“. After that, do the following codes as follows.

about.php Code:

  • Create a file and name it “about.php“. After that, do the following codes as follows.

contact.php Code:

Output:

 

 

Readers might read also:

 

 

Facebook Comments

LEAVE A REPLY

Please enter your comment!
Please enter your name here