what you could do. supposing each new paragraph starts with a new line and an indent of 2 characters.
<?
$lines=explode("\n", $input);
$para1="";
$got=0;
$lineat=0;
while ( $got == 0 && $lineat < count($lines) )
{
if ( substr($lines[$lineat], 0, 2) == " " )
{
$got=1;
}
else
{
$para1.=$lines[$lineat]."\n";
$lineat++;
}
}
?>
Mark.