DansTonCode.net
quote.smartness() == 42Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.@author Martin Golding
Quote #338
php
@
author 
Anonymous
0
$commentaire = nl2br($e['commentaire']);

if (mb_strlen($e['commentaire']) > 50) {
   $e['commentaire'] = mb_substr($e['commentaire'], 0, 50) . ' (...)';
} else {
   $e['commentaire'] = $e['commentaire'];
}
Code-source en php proposé par Anonymous
 
 0