How can PHP and HTML be effectively separated in a code structure?

To effectively separate PHP and HTML in a code structure, one common approach is to use a templating system such as PHP's built-in `include` function or a third-party templating engine like Twig. By separating the logic (PHP) from the presentation (HTML), it improves code readability, maintainability, and reusability.

<?php
// PHP logic
$data = [
    'title' => 'Welcome to my website',
    'content' => 'This is some sample content',
];

// Include HTML template
include 'template.php';
?>
```

In the `template.php` file:

```html
<!DOCTYPE html>
<html>
<head>
    <title><?php echo $data['title']; ?></title>
</head>
<body>
    <div>
        <?php echo $data['content']; ?>
    </div>
</body>
</html>