PHP 8.5.0 Alpha 4 available for testing

Voting

: six minus five?
(Example: nine)

The Note You're Voting On

phil_marmotte at yahoo dot fr
11 years ago
Another Word wrap from left or right :

public static function myWordWrap ($string, $length=3, $wrap=',', $from='left') {
if ($from=='left') $txt=wordwrap($string, $length, $wrap, true);
if ($from=='right') {
$m = strlen($string)%$length;
if ($m < strlen($string))
$txt = substr($string,0,$m).$wrap.wordwrap(substr($string,$m),$length, $wrap, true);
else
$txt = $string;
}

return $txt;
}

<< Back to user notes page

To Top