Hello. I have a two-dimensional array:
$massiv = array ( 'КАТЕГОРИЯ: Материал' => array ( 0 => 'Дерево', 1 => 'Сталь', ), 'КАТЕГОРИЯ: Применение' => array ( 0 => 'В сухом помещении', 1 => 'Сауны', ), ); I want to make sure that all these values for the array are taken from the MySQL database, since there may be an unspecified number of parameters, and it’s not very convenient to write everything into the code.
That is, categories and sub categories can be any number.
Categories are stored in the category table, and subcategories in the podcat table.
Here's how to bring them into a similar array, I have not yet come to the conclusion ...
I would be grateful for any useful information.