/ Published in: PHP
Updated trimmer, there were a couple of typos.
Expand |
Embed | Plain Text
<?php function trimmer($str, $length=100, $link=null, $tail='...', $wrap="<p>", $tags=false) { //start wrap if set //check length and add tail if needed. { $str .= $tail; }//end if //check if we want tags or not //add link if set " : ''; //end wrap if set return $open.$str.$close; }//end of trimmer ?>
You need to login to post a comment.
