Are there any best practices or alternative approaches to maintaining a static header section across multiple pages in a PHP website?

To maintain a static header section across multiple pages in a PHP website, one common approach is to use include or require statements to include a separate header file in each page. This allows you to make changes to the header in one place and have it reflect across all pages that include it.

<?php
// header.php

echo '<header>';
echo '<h1>My Website</h1>';
echo '<nav>';
echo '<a href="index.php">Home</a>';
echo '<a href="about.php">About</a>';
echo '<a href="contact.php">Contact</a>';
echo '</nav>';
echo '</header>';
?>
```

To include this header in your other PHP pages, you can use the following code:

```php
<?php
// index.php

include 'header.php';

// Rest of your index page content
?>