Forum Moderators: coopster
$a[array2] = substr($a[array1], 0, 200)." ...";
Generally it cuts off in the middle of a word which is why I use the "..." I really think it would look more professional and more pleasing to the eye if it didn't cut off mid-word/mid-sentence.
Is there anything that will go to the number of characters specified but then go on to include everything up until the next full stop? Or at least the next space so that it does not cut off in the middle of words.
To avoid mid-sentence, apply the same principle, except with complete sentences, as determined by the placement of a period. That won't work on sites where people don't use proper sentence structure.
Actually, for either of those methods, you could then use strlen to decide if you want to add or remove a bit of text.