What potential issues can arise when using PHP to output data within a div container?

One potential issue that can arise when using PHP to output data within a div container is that the HTML structure may become messy and hard to read. To solve this issue, you can separate the PHP logic from the HTML markup by using PHP to echo out the necessary data within the div container.

<div>
    <?php
        $data = "Hello, World!";
        echo "<p>$data</p>";
    ?>
</div>