There are a number of ways to do this. Here are two so you can choose the one you prefer.
First is the nl2br() function.
e.g.
$textarea = nl2br( $textarea );
Second is using ereg_replace().
e.g.
$textarea = ereg_replace( "\r\n", "<br>", $textarea );
Either of those should do the job.