What are the potential pitfalls of storing <br> tags in a database for displaying text with line breaks?

Storing <br> tags in a database for displaying text with line breaks can lead to inconsistent formatting and make it difficult to update or modify the text later on. To solve this issue, it is recommended to store the text in the database without <br> tags and instead use PHP to dynamically insert line breaks when displaying the text on the website.

&lt;?php
// Retrieve text from the database
$text = &quot;This is a sample text with line breaks.&lt;br&gt;It should be displayed with proper formatting.&quot;;

// Replace &lt;br&gt; tags with PHP_EOL (line break)
$formatted_text = str_replace(&quot;&lt;br&gt;&quot;, PHP_EOL, $text);

// Display the formatted text
echo nl2br($formatted_text);
?&gt;