include and require let you reuse repeated pieces of a file across your project. Splitting things like headers, footers, database connections, and helper functions into their own files makes the code much easier to maintain as your project grows.
php
<!-- index.php -->
<?php include "partials/header.php"; ?>
<h1>Welcome to my website</h1>
<p>This page uses a reusable header and footer.</p>
<?php include "partials/footer.php"; ?>You should see
A page will render with a reusable header, content, and footer.