- print_r: documentation ( source)
- str_split: documentation ( source)
<?php
$mass = str_split('0123');
$length = 6;
foreach ($mass as $el) {
$srt = null;
for ($i = 1; $i <= $length; $i++) {
$str += $el;
if($i = $lenght) {
$str = null;
}
print_r($str);
}
}