$a = array('a','b','c','d','e','f');
$b = array('1','2');
$count = 0;
$d = 0 ;
$input = array('ina', 'inb','inc');
foreach ($a as $key => $v) {
$count++;
echo $v;
echo $input[$key];
if ($count%3 == 0){
echo $b[$d++];
reset($input);
}
}
I want like this output
1
a-ina
b-inb
c-inc
2
d-ina
e-inb
f-inc
Actually I want $input two times in a foreach loop. $a have 6 items $input have 3 items and $b have 2 items. I need