I have a header section on my site which outputs the title and the first sentence of a news article. Below I would like to output the rest of the article minus the first paragraph.
Something like this would be great:
// Full Article
$NewsArticle = "This is the article. I hope you like it.";
// Find the First Full stop
// Save everything after the first full stop to $NewsArticle
$NewsArticle == "I hope you like it";
Any help on this would be great!
Thanks
Alex
Try this
substr($NewsArticle, strpos($NewsArticle, ".")+1)
Just use substr function.
$str = "This is the article. Enjoy reading it. I hope you like it.";
$str_res = substr($str, strpos($str, ".")+1);
echo $str_res;