I actually don't understand what you need?
Anyways if you use shift+enter you get \n or \r\n. Can't remember right now.
So if you want to replace let's say \n with <br /> you do it like this:
$str = "Hello \n World";
$str = str_replace('\n', '<br />', $str);