fishb6nes
Member
I'm displaying a news feed on my home page by retrieving the latest threads in a certain set of nodes from the db and subsequently retrieving the messages belonging to their OPs. The messages appear to be stored with new lines and all in the db, but as soon as I put them in a paragraph it displays as one large continues string.
Live demo: http://seventhsin.gg
Code that retrieves the message:
Am I missing a certain character I should call str_replace('char', '<br />', $message); on or am I losing the new lines all together via the way I'm retrieving the data?
Live demo: http://seventhsin.gg
Code that retrieves the message:
Code:
$sql = "SELECT message FROM xf_post WHERE post_id = " . $post_id . ";";
$result = $db->query($sql);
if ($result->num_rows > 0) {
$row = $result->fetch_assoc();
$message = $row['message'];
$result->free();
}
Am I missing a certain character I should call str_replace('char', '<br />', $message); on or am I losing the new lines all together via the way I'm retrieving the data?