What is the purpose of using include to load content into a div in PHP?

When using include to load content into a div in PHP, the purpose is to dynamically load content from separate PHP files into a specific area on a webpage without reloading the entire page. This can be useful for modularizing code, improving code organization, and making it easier to update or change content without affecting the rest of the page.

<div id="content">
    <?php
    if (isset($_GET['page'])) {
        $page = $_GET['page'];
        include($page . '.php');
    } else {
        include('default.php');
    }
    ?>
</div>