I had the same problem and cobbled together this hack from two or three other similar functions I saw on the net:
function word_wrap($texte,$lng_max) {
// Script
$esp=explode(" ",$texte);
$i=0;
$carac_dep=0;
$tmp_txt="";
// sur tout la longeur du texte
while ($i<=count($esp)) {
$lng_mot=strlen($esp[$i]);
// si le mot est trop gd
if ($lng_mot>$lng_max) {
// on decoupe
$nb_f=($lng_mot/$lng_max)+1;
$mot="";
for ($j=0;$j<=$nb_f;$j++) {
$mot.=substr($esp[$i],($j*$lng_max),$lng_max)."<br />";
}
$esp[$i]=$mot;
}
$tmp_txt.=$esp[$i]." ";
$i++;
}
return $tmp_txt;
}