What are the advantages and disadvantages of using the "include" function versus other methods for incorporating HTML content in PHP?

When incorporating HTML content in PHP, using the "include" function can make the code more organized and easier to manage. However, it may also introduce security risks if the included files are not properly sanitized. Other methods, such as using output buffering or template engines, can provide more control over the content being included.

<?php
// Using the include function to incorporate HTML content
include 'header.php';
include 'content.php';
include 'footer.php';
?>