Re: [PHP] displaying certain number of character

2005-08-31 Thread Shafiq Rehman
Hey Philip you can use this function function cuttext($text, $maxChars = 20, $tail = '') { $arrWords = explode(" ", $text); $temp = ""; for ($i=0; $i wrote: > > > $words= "If length is given and is negative, > > then that many characters will be omitted from > > the end of string (after the start

Re: [PHP] displaying certain number of character

2005-08-30 Thread Philip Hallstrom
$words= "If length is given and is negative, then that many characters will be omitted from the end of string (after the start position has been calculated when a start is negative). If start denotes a position beyond this truncation, an empty string will be returned. "; echo substr($words, 0, 50