I've been having trouble capturing new line characters before inserting strings into my db. the following did not work: str_replace("\n", "<br/>", $string); htmlentities($string, ENT_QUOTES); htmlspecialchars ($string); any suggestions?