How can the include command in PHP be used to insert a PHP file into a specific section of a webpage?

When using the include command in PHP to insert a PHP file into a webpage, you can specify the exact location within the HTML where you want the included file to appear by using PHP tags to echo the included file at that specific location. This allows for more control over the layout and structure of the webpage.

<html>
<head>
    <title>My Webpage</title>
</head>
<body>
    <header>
        <?php include 'header.php'; ?>
    </header>
    
    <main>
        <p>Welcome to my webpage!</p>
    </main>
    
    <footer>
        <?php include 'footer.php'; ?>
    </footer>
</body>
</html>