$auto = array ('LADA' => array(1999, 2001), 'BMW' => array(2005, 2016), 'KARMA' => array(2017, 2019));
foreach($auto as $brand => $massiv){
foreach($massiv as $inner_key => $value){
echo $value
}
}
<table>
<th>
<td>LADA</td>
<td>BMW</td>
<td>KARMA</td>
</th>
<tr>
<td>1999</td>
<td>2005</td>
<td>2017</td>
</tr>
</table>
$keys = array_keys($auto);
$header = implode("", array_map(function($n) {
return "<th>$n</th>";
}, $keys));
$rows = implode("", array_map(function($i) use($auto, $keys) {
return "<tr>".implode("", array_map(function($n) use($auto, $i) {
return "<td>".$auto[$n][$i]."</td>";
}, $keys))."</tr>";
}, range(0, count($auto[$keys[0]]) - 1)));
echo "<table>$header$rows</table>";