To turn "\n" into "", you can use the PHP function nl2br(). This function replaces all occurrences of newlines (\n) with HTML line breaks (). Here's an example:
$text = "This is a\nmultiline\ntext.";
$formattedText = nl2br($text);
echo $formattedText;
This will output:
This is a<br>
multiline<br>
text.
So in your case, you can use nl2br() to format the text before displaying it on the page. Here's an example:
// Get the text from the database
$text = $row['text'];
// Format the text with nl2br
$formattedText = nl2br($text);
// Display the formatted text
echo $formattedText;
This will replace all newlines in the text with HTML line breaks, so it will be displayed with proper formatting on the page.