Hopefully the last question

Two issues

1. Have a text area where the operator can enter whatever and it then gets written to the database. Unfort it's not including paragraph breaks Is there a function in PHP to replace line breaks with <br /> or something similar.

2. Names entered as O'Brian are appearing as O\'Brian when read from the database, does PHP have a character escape function, cause I guess that's what I need.