Hi
Assuming the text is where? A Text file?
If so, can you read it into an array?
e.g.
$textbit=file('filename');
This will split the text file up into individual rows.
then
$newpara=1;
for ($i=0;$i<count($textbit);$i++)
{
if ($newpara==1)
{
echo "<p>";
$newpara=0;
}
if (rtrim($textbit[$i])=="")
{
echo "</p>";
$newpara=1;
} else {
echo rtrim($textbit[$i]);
}
}
That's assuming the text file is in the format of:
text
text
text
blank line
text
text
etc
Otherwise play around with it a bit. I didn't check the code, so make sure it is syntax correct!
Trevor