Array ( [1] => Array ( [0] => 1 [1] => 2 [2] => 6 [3] => 7948 [4] => 2 ) [2] => Array ( [0] => 2 [1] => 2 [2] => 6 [3] => 6918 [4] => 2 ) )
foreach ($enemy as $key)
{
foreach ($key as $key2 => $value)
{
if ($key == 0){echo '<input type="hidden" name="enemy['.$key.'][]" value="'.$value.'">';}
if ($key == 1){echo '<input type="hidden" name="enemy['.$key.'][]" value="'.$value.'">';}
if ($key == 2){echo '<input type="hidden" name="enemy['.$key.'][]" value="'.$value.'">';}
if ($key == 3){echo '<input type="hidden" name="enemy['.$key.'][]" value="'.$value.'">';}
if ($key == 4){echo '<input type="hidden" name="enemy['.$key.'][]" value="'.$value.'">';}
if ($key == 5){echo '<input type="hidden" name="enemy['.$key.'][]" value="'.$value.'">';}
}
}
Как сделать вывод ключей первого массива в $key?