What potential issues can arise when including content from a text file using PHP, especially in terms of formatting and HTML tags?

When including content from a text file using PHP, potential issues can arise with formatting and HTML tags. To ensure that the content is displayed correctly within an HTML page, you can use the `htmlspecialchars()` function to escape special characters and prevent HTML injection attacks.

<?php
$file_content = file_get_contents('example.txt');
echo htmlspecialchars($file_content);
?>