我有一个这样的字符串:
$contenuto = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut lobortis condimentum commodo. Duis dui dui, rutrum et lacinia sit amet, lacinia in nulla.";
我需要将它分解为一个限制为 20 个字符的子字符串数组,如下所示:
Array
(
[0] => "Lorem ipsum dolor ";
[1] => "sit amet, ";
[2] => "consectetur ";
[3] => "adipiscing elit. Ut ";
[4] => "lobortis condimentum";
[5] => "commodo. Duis dui ";
[6] => "dui, rutrum et ";
[7] => "lacinia sit amet, ";
[8] => "lacinia in nulla.";
)
我怎样才能做到这一点?