note 11957 added to function.wordwrap.php

From: Date: Thu, 15 Mar 2001 06:31:28 +0000
Subject: note 11957 added to function.wordwrap.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-12420@lists.php.net to get a copy of this message
a wordwrap-replacement for backward compatibility: function wordwrap_msg($msg, $maxwordlen=40) { $eachword = explode(" " , eregi_replace("&ltBR&rt"," ",$msg)); for ($i=0; $i<count($eachword); $i++) { if (strlen($eachword[$i])>$maxwordlen) { $msg = eregi_replace($eachword[$i], chunk_split($eachword[$i],$maxwordlen), $msg); } } return $msg; } http://www.php.net/manual/en/function.wordwrap.php

« previous php.notes (#12420) next »