Textarea input - how to deal with paragraphs and headings?
I currently use the following expression which I use to put paragraph tags around textarea input before storing it in a MySQL database. $inputText = str_replace('<p></p>', '', '<p>' . preg_replace('#([\r\n]\s*?[\r\n]){2,}#', '</p>$0<p>', $inputText) . '</p>'); This works well and good, except when I wish to use header tags. These are ...