How can the combination of PHP and HTML in a script affect readability and maintenance in the long run?

Mixing PHP and HTML in a script can make the code harder to read and maintain in the long run, as it can lead to a cluttered and confusing codebase. To improve readability and maintenance, it is recommended to separate the PHP logic from the HTML markup by using a templating system like PHP's built-in `include` function or a more advanced templating engine like Twig.

<?php
// Separate PHP logic from HTML markup using include function

// PHP logic
$variable = "Hello, World!";

// HTML markup
?>
<!DOCTYPE html>
<html>
<head>
    <title>PHP HTML Separation</title>
</head>
<body>
    <h1><?php echo $variable; ?></h1>
</body>
</html>