У меня есть три разных массива:
$months array looks like that:
Array ( [0] => January [1] => September [2] => September [3] => August [4] => November [5] => December [6] => March )
$pnames:
Array ( [0] => Furry Wheels [1] => Hanazuki [2] => Hanazuki [3] => Mighty Magisword [4] => Niko [5] => Niko [6] => Teen Titans Go! )
$theme_names
Array ( [0] => ANM INB [1] => ANM INB [2] => TEST NAME [3] => ANM INB [4] => ANM INB [5] => TEST NAME [6] => ANM INB )
Я хочу напечатать его вместе в foreach
выражении:
foreach ($months as $key => $month) {
echo '<b>'.$month.'</b><br>'.$pnames[$key].' '.$theme_names[$key].', ';
echo '<br><br>';
}
Мой результат:
January
Furry Wheels ANM INB,
September
Hanazuki ANM INB,
September
Hanazuki TEST NAME,
August
Mighty Magisword ANM INB,
November
Niko ANM INB,
December
Niko TEST NAME,
March
Teen Titans Go! ANM INB,
Итак, мой вопрос, как я могу объединить те же месяцы?Я хочу получить это:
January
Furry Wheels ANM INB,
September
Hanazuki ANM INB, Hanazuki TEST NAME,
August
Mighty Magisword ANM INB,
November
Niko ANM INB,
December
Niko TEST NAME,
March
Teen Titans Go! ANM INB,