Hello everyone and thanks much for your past help!
I want to list the first three paragraphs from an article on a page, then have a link for the full article after the third paragraph.
I am relatively new to PHP and know how to take care of this in ASP, but I am racking my brain of how to break it apart at the third paragraph.
I have been playing around with the following, but to no avail. It doesn't break it off at the third paragraph. Any help would be much appreciated!
<?php if ($RSMiddle1['Body'] != "") {
$str = $RSMiddle1['Body'];
$cols = explode(chr(13),$str);
$i = 0;
while ($i < count($cols))
{
$PG1 = $cols[$i];
$PG2 = $cols[$i + 1];
$PG3 = $cols[$i + 2];
echo $PG1 . "<p>". $PG2 . "<p>" . $PG3 . "<p>";
$i += 2;
$i++;
}
}
?>