I have a mySQL database that has a column with a new article in it. It is stored with all the appropriate carriage returns.
When I display it on the page, I only want the first paragraph to be displayed.
Can someone give me a nudge in the right direction on this one?
Get article
$article = $row['article'];
Find position of first CR (\r\n for win, \n for nix)
$p = strpos($article , "\n");
Get first para
$para = substr($article, 0, $p);
hth