Posted By

iloveitaly on 05/26/09


Tagged

display character String limit ellipsis


Versions (?)

Limit Character / String Display With Fake Ellipsis


 / Published in: PHP
 

  1. function stringDisplay($str, $charLimit) {
  2. if(strlen($str) > $charLimit) return substr($str, 0, $charLimit).'...';
  3. return $str;
  4. }

Report this snippet  

You need to login to post a comment.