note 23867 deleted from function.substr by victor
| From: | victor@php.net | Date: | Wed, 02 Oct 2002 10:43:53 +0000 |
| Subject: | note 23867 deleted from function.substr by victor | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-37531@lists.php.net to get a copy of this message | ||
Hi!!!
I write the follow code por php3...
function wordwrap($cadena){
$longitud=40;
$tamano=strlen($cadena);
$final="";
while($tamano>$longitud)
{
$temp=substr($cadena,0,$longitud);
$final=$final.$temp."<br>";
$valor=$longitud-$tamano;
$cadena=substr($cadena,$valor);
$tamano=strlen($cadena);
}
return $final;
}
you can try it and send me your suggestions.
See you