There is an array
array(3) { [0] => array(2) { ["name"] => string(13) "Имя 1" ["group"] => string(22) "Значение 1" } [1] => array(2) { ["name"] => string(13) "Имя 2" ["group"] => string(26) "Значение 2" } [2] => array(2) { ["name"] => string(13) "Имя 3" ["group"] => string(22) "Значение 1" } } PHP script:
<?php foreach ($product_filters as $product_filter) { ?> <div> <?php echo $product_filter['group']; ?> - <?php echo $product_filter['name']; ?> </div> <?php } ?> It is necessary to output in one div arrays c "Value 1", and in the other c "Value 2" and so on, what would happen like this
<div> Имя 1 - Значение 1 Имя 3 - Значение 1 </div> <div> Имя 2 - Значение 2 </div> и т.д...