Simple question, I guess but I dont manage to solve it.
I pull a text from a db with xPDO and need to replace all
\n with a
< br>
I am using this script and want to replace all \n in the text from
text123 so that I have
return $output with < br> instead
$output = '';
$sql = "SELECT * FROM my_table WHERE id = 310633997";
foreach ($xpdo->query($sql) as $row) {
$output .= $row['text123'];
}
return $output;
Any help apreciated
[ed. note: sh0ck23 last edited this post 10 years, 10 months ago.]