$notes = ereg_replace("(\r\n|\n|\r)", "",$notes);
$notes=nl2br($notes);
If you're going to turn newlines into break tags, don't take the newlines out first.
$notes=nl2br($notes);
$notes = ereg_replace("(\r\n|\n|\r)", "",$notes);
This might be faster:
$notes=nl2br($notes);
$notes = str_replace("\r", "",$notes);
$notes = str_replace("\n", "",$notes);