Есть масив, нужно перенести значение “производитель” на первое место, тоесть должно стоять перед “Используемый кофе: молотый / зерновой”, количество елементов в масиве может быть разное
<?php if ($ attribute_groups) { ?> <div class="tab-pane" id="tab-specification"> <div class="tab-bg"> <table class="table table-striped table-hover"> <?php foreach ($ attribute_groups as $ attribute_group) { ?> <thead> <tr> <td colspan="2"><strong><?php echo $ attribute_group['name']; ?></strong></td> </tr> </thead> <tbody> <?php foreach ($ attribute_group['attribute'] as $ attribute) { ?> <tr> <td><?php echo $ attribute['name']; ?></td> <td><?php echo $ attribute['text']; ?></td> </tr> <?php } ?> </tbody> <?php } ?> </table> </div> </div> <?php } ?>