What are the best practices for structuring PHP scripts to ensure proper header/body separation in HTTP responses?

Proper header/body separation in HTTP responses is crucial for ensuring that the response is correctly interpreted by the client. To achieve this, it is recommended to send all headers before any output is sent to the body. This can be easily achieved by structuring your PHP script to first set headers using functions like header() or setcookie(), and then outputting the body content.

```php
<?php

// Set headers before any output
header('Content-Type: text/html');

// Output body content
echo '<html><head><title>Example</title></head><body><h1>Hello, World!</h1></body></html>';

?>