$text = preg_replace("/\r\n|\n|\r/", "<br />", $text);
$text = str_replace ( chr(10), "<br />", $text );