Last active
August 17, 2017 16:37
-
-
Save i5ar/3219edabdfa62a0eb11f to your computer and use it in GitHub Desktop.
Get the first 500 characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$string = $post->post_content; | |
$newString = substr($string, 0, 500); | |
echo $newString; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment