are you starting out from an html textarea and bringing it into the database? i hope so cause i'm gonna show you one way..
if you are then you can take the textarea variable and split it into an array, then write the array into the database... ie.
$array=split("\n",$textarea);
$count=count($array);
$i=0;
while($i < $count){
$result=mysql_query("insert into table set test=$array[$i]");
++$i;
}
split will take each new line "\n" and put it in an array.
if that is not what you meant.. sorry =P