There is a multidimensional array for example:
<?php $prod = array( array( "Название" => "Первый продукт", "Производитель" => "Япония", "Год выпуска" => 2016 ), array( "Название" => "Второй продукт", "Производитель" => "Корея", "Год выпуска" => 2016 ), array( "Название" => "Третий продукт", "Производитель" => "Россия", "Год выпуска" => 2014 ) ); echo '<table><tbody>'; foreach($prod as $value){ echo '<tr><td>'; foreach($value as $key => $val){ echo '<td>'.$key .'=>'. $val.'</td>'; } echo '</td></tr>'; } echo '</tbody></table>'; ?> I want to make a table of it, in which each row will be a separate characteristic, and each cell in this row should be one of the variants of this characteristic.
That is, in the first line I had 3 cells with names, in the second - with manufacturers, and in the third year, and so on. the number of characteristics I have is constantly changing, the brain broke, it turned out different, and only today I realized that the characteristics should be recorded line by line, and the maximum that happened was to write a separate characteristic into a separate cell, which is absolutely not good.
