What is the purpose of using PHP include in separating header and footer files?

Using PHP include to separate header and footer files allows for better organization and maintainability of code. By creating separate files for the header and footer, you can easily make changes to these sections without having to modify every single page on your website. This also helps in reducing redundancy and promoting code reusability.

<?php
include 'header.php';
// Your page content here
include 'footer.php';
?>