Skip to content

Instantly share code, notes, and snippets.

@Nelrohd
Created January 19, 2015 02:36
Show Gist options
  • Save Nelrohd/4be5d4c73eeda16ce9d9 to your computer and use it in GitHub Desktop.
Save Nelrohd/4be5d4c73eeda16ce9d9 to your computer and use it in GitHub Desktop.
<?php
$text = $post['text'];
if (strlen($text)) > 500) {
$text = substr($text, 500) . "...";
}
echo $text;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment