How does using include in PHP affect the modularity and maintainability of a website's code structure?

Using include in PHP allows for better modularity and maintainability of a website's code structure by allowing you to separate code into different files and include them where needed. This helps in organizing code logically, making it easier to manage and update specific parts of the code without affecting the entire website. It also promotes code reusability and reduces redundancy in the codebase.

// index.php
include 'header.php';
include 'content.php';
include 'footer.php';