What are the advantages and disadvantages of using PHP to include templates in a webpage?

When including templates in a webpage using PHP, the main advantage is the ability to reuse code and easily update the design across multiple pages. This can save time and effort in maintaining a consistent look and feel. However, using PHP to include templates can also introduce security risks if not properly sanitized, as it allows for the execution of PHP code within the template files.

<?php include 'header.php'; ?>
<?php include 'content.php'; ?>
<?php include 'footer.php'; ?>