Skip to content

Instantly share code, notes, and snippets.

@nuriye
Last active December 12, 2018 14:43
Show Gist options
  • Save nuriye/29cdc05494c6960766fe00c857ddcab8 to your computer and use it in GitHub Desktop.
Save nuriye/29cdc05494c6960766fe00c857ddcab8 to your computer and use it in GitHub Desktop.
preg_match('/^([^.!?]*[\.!?]+){0,2}/', strip_tags($contentNoTags), $abstract);
echo $abstract[0];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment