Let's say we want to put hundred different web pages. Bunch of time, going to webpage to webpage and updating each one, one by one, with include function.
You need very time to display the above output in your every web page.
Just use include key word and file name that you attach.
<p> This is first page <p/>
<p> This is second page <p/>
You need not open menu.php file.
When you open first.php file and second.php file, menu.php file will automatically open each time. Need not require write extra code for menu. Include acts like function call.
Differences between require and include
Both include and require used to include a file but when included file not found Include send Warning where as Require send Fatal Error.
See AlsoExplode Function