so in future should i rather, before writting my text rather use:
$final_text = nl2br($_POST['text'];
rather than regular expressions.?
and when i write to the db use INSERT blah blah (text) VALUES ("$final_text");?
also when displaying the text for editing purposes in textarea's use strip_tags($row['text'];
but of course no need to do this in normal html, the layout will be present in the db?
would this be the correct way to handle paragraph spacing?
is there anything i missed here?
the reason i used ereg_replace for the past two years or so is that pdf's mess up the format pretty badly when you paste it in a textarea.