What other PHP functions or methods can be used to handle line breaks in text stored in a database?
When storing text in a database, line breaks are often represented as "\n" or "\r\n". When retrieving this text and displaying it on a webpage, you can use the PHP function nl2br() to convert these line breaks into HTML <br> tags. This will ensure that the text is displayed with proper line breaks on the webpage.
$text = "This is a text with\nline breaks.";
echo nl2br($text);