Guest User

Untitled

a guest
Jan 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. function substringEllipsis($string, $start, $length, $lenience = 5, $overflowText = '...')
  2. {
  3. $sub = substr($string, $start, $length);
  4. return strlen($string) - strlen($sub) <= $lenience ? $string : $sub.$overflowText;
  5. }
Add Comment
Please, Sign In to add comment