I need a function to prosses my textarea field input before I save it in my database.
Textarea field input:
Hi
sahdj sdhjsdj f hasjhf ash dsdhasd hjsdhjashdhsadj sjsadhjsdhjhassdnsdnnjas
Thanks
I want to make it look like this:
Hi<p></p>sahdj sdhjsdj f hasjhf ash dsdhasd hjsdhjashdhsadj sjsadhjsdhjhassdnsdnnjas<p></p>Thanks
Just want to replace line break with a <p></p>.
output onlyformattingnl2br();not database formatting{}toolbar button.nl2br()...?! I always did it manually (so thanks!)preg_replace("/\r?\n/", '<p></p>', $string);