This is a problem which is hard to explain without actually showing the problem.
We start off with view-source:
Everything should be inside < p> but instead it closes < p>.
My code:
<p>'.bbCode($Posts['content'], $Posts['id']).'</p>';
and also the preg_replace creating the quote:
$text = preg_replace('/\[quote=([^\]]+)?\]/is', '<div class="quote"><strong>$1 skrev:</strong><br />', $text);
$text = preg_replace('/\[quote[^\]]+\]/is', '<div class=\"quote\"><br />', $text);
$text = preg_replace('/\[\/quote\]/is', '<br clear=\"all\" /></div>', $text);
`) and the browser is trying to correct it. Post the rendered HTML please.
` can only contain inline elements. See - http://stackoverflow.com/questions/8397852/why-p-tag-cant-contain-div-tag-inside-it
– sbeliv01 Jul 21 '15 at 14:40` tag as noted.
– sbeliv01 Jul 21 '15 at 14:42