Subscribe to Tutorial Feed

Flash and PHP Bible

The Flash and PHP Bible has been released! The book can be found on Amazon or wherever fine books are sold in your area.

The Flash and PHP Bible has a forum for quick support.

Scriptplayground » tutorials » php » PHP Include

PHP Include

Here is a code snippet to include a file in your php page.

<?php
$exampleFile = 'header.php';
include($exampleFile);
?>

or you could include multiple files on one page.

<?php
include 'header.php';

// Some HTML code could go here!

include 'main.php';

// Some more HTML code could go here!

include 'footer.php';
?>

Follow Scriptplayground on Twitter (@scriptplay)

Comments: PHP Include

No Comments have been made. Wanna be the first?
Add a comment
The ability to add new comments has been disabled in this archived version.

Loading
Main | Tutorials | Articles