With a concat method instead:
<?php
$array = array(
'somestring',
'otherstring',
'anotherstring',
'nextstring',
'endstring'
);
$count = 0;
for ($i2 = 1; $i2 <= 20; $i2++)
for ($i = 0; $i < count($array); $i++)
echo ++$count . ' ' . $array[$i] . ' ' . $i2 . "\n";
1 somestring 1
2 otherstring 1
3 anotherstring 1
4 nextstring 1
5 endstring 1
6 somestring 2
7 otherstring 2
8 anotherstring 2
9 nextstring 2
10 endstring 2
11 somestring 3
[..truncated...]