wordwrap ? 
 De Thomas Dubois - Dimanche 13 Mai 2001 à 14:05

Hello
Il y a une fonction apparement toute faite, mais aurait qq pbs avec le code html, facilement contournables :
http://www.php.net/manual/fr/function.wordwrap.php

Tom

  autre façon de faire 
 De Olivier Brouckaert - Vendredi 29 Juin 2001 à 11:30

function trunc_str($texte,$length,$end_str)
{
if(strlen($texte) <= $length) return $texte;
return trim(substr($texte,0,$length))."$end_str";
}

echo trunc_str("Hello World !",5,"...");

et là c paramètrable :)

affiche : Hello...