par
zigz4g » 26 juin 2006, 13:18
Salut.
Voici un bout de la doc :
string wordwrap ( string str [, int width [, string break [, bool cut]]] )
Pour toi, il faudrait faire au plus simple comme ceci :
<?php
$text = "Portez ce vieux whisky au juge blond qui fume.";
$newtext = wordwrap( $text);
echo "$newtext\n";
?>
Normallement ça devrait te retourner une chaine couper vers 75 caractères comme dit dans la doc.
http://fr2.php.net/manual/fr/function.wordwrap.php
Salut.
Voici un bout de la doc :
[quote]
string wordwrap ( string str [, int width [, string break [, bool cut]]] )
[/quote]
Pour toi, il faudrait faire au plus simple comme ceci :
[php]
<?php
$text = "Portez ce vieux whisky au juge blond qui fume.";
$newtext = wordwrap( $text);
echo "$newtext\n";
?>
[/php]
Normallement ça devrait te retourner une chaine couper vers 75 caractères comme dit dans la doc.
[url]http://fr2.php.net/manual/fr/function.wordwrap.php[/url]