Return to Snippet

Revision: 55394
at February 5, 2012 05:43 by pruntrut


Initial Code
$chaine = $data['ContenuNews'];

// le nombre de lettres                   
$max = 65; 
 
                        if (strlen($chaine) >= $max) { 
                         $chaine = substr($chaine, 0, $max); 
                         $espace = strrpos($chaine, " "); 
                         $chaine = substr($chaine, 0, $espace)."..."; 
                        } 

                        echo stripslashes($chaine);

Initial URL


Initial Description


Initial Title
Limiter Nbr Lettre

Initial Tags


Initial Language
PHP