PHP Wordwrap在一个角度,每次突破增加缩进

is it possible with php's wordwrap to add increased indentation each line break to essentially create wordwrapping on an angle?

If I understand your question correcly, you would like to produce an output like:

xxxxxxx
xxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxxxx
xxxxxxxxxxxxxxx

Obviously, replacing x with your text.

wordwrap built-in function does not support this feature but you still can write your own, with a simple loop. Change the max length on each iteration, and break your initial string (depending on your needs, where you find a space or wherever you want).

<?php
$text = "The quick brown fox jumped over the lazy dog.";
echo $return = costomwrap($text , 10);

function costomwrap($text , $len)
{
$str = '';
for($i=0;$i<strlen($text);$i = $i+$len)
{
  $str .= substr($text , $i , $len ).'<br />';
  $len--;
}
return $str;
}

?>

live demo http://codepad.org/v3ysqV5A. here, <br /> not come on your programme.