How can users be given the option to turn off background music on a website created with PHP?

To give users the option to turn off background music on a website created with PHP, you can create a toggle button or checkbox in the user settings section. When the user toggles the button to turn off the music, you can store this preference in a session or database variable. Then, in your PHP code that includes the background music, you can check this variable and conditionally include or exclude the music based on the user's preference.

```php
<?php
session_start();

// Check if user has turned off background music
$musicEnabled = isset($_SESSION['music_enabled']) ? $_SESSION['music_enabled'] : true;

if($musicEnabled) {
    // Include background music
    echo '<audio autoplay loop><source src="background_music.mp3" type="audio/mpeg"></audio>';
}
?>
```

In this code snippet, we check if the `music_enabled` session variable is set and use it to determine whether to include the background music. The user can toggle this variable in their settings, and the music will be included or excluded accordingly.