Re: [PHP] string effect

2008-03-04 Thread tedd
At 9:51 PM +0100 2/29/08, Alain Roger wrote: What is the basic rule ? Text is cut off based on (numbers of words, number of characters,..) ? Yes. Use whatever you want. You can use the number characters or find the last *space* in a string that's just long enough to fit your limit. Let's sa

Re: [PHP] string effect

2008-03-01 Thread Richard Heyes
Mr. Heyes more or less prompted me to go dig for my other, slightly heavier version, that doesn't chop words up: Sorry I hit Reply instead Reply All. Regardless, here's my str_curtail. There is a bug in it that means if the string is all one word then it gets curtailed to nada, but that's easi

Re: [PHP] string effect

2008-02-29 Thread Greg Donald
On 2/29/08, Alain Roger <[EMAIL PROTECTED]> wrote: > Text is cut off based on (numbers of words, number of characters,..) ? > what is the algorithm for such thing ? Mr. Heyes more or less prompted me to go dig for my other, slightly heavier version, that doesn't chop words up: function breakU

Re: [PHP] string effect

2008-02-29 Thread Greg Donald
On 2/29/08, Alain Roger <[EMAIL PROTECTED]> wrote: > Hi, > > since a long time now, i see that some paragraphs of text are cut off and > the additional text is replaced by 3 dots. > e.g: > > "this is the original long text but without any sense and also stupid" > > effect desired : > "this is