Здравствуйте господа.
Есть массив $mainArr в котором
array (
0 =>
array (
'id_product_attribute' => '60',
'attribute_name' => 'S',
'group_name' => 'Size',
'public_group_name' => 'Size',
'group_type' => 'radio',
'attribute_color' => '',
'quantity' => '9565',
),
1 =>
array (
'id_product_attribute' => '59',
'attribute_name' => 'M',
'group_name' => 'Size',
'public_group_name' => 'Size',
'group_type' => 'radio',
'attribute_color' => '',
'quantity' => '5555',
),
2 =>
array (
'id_product_attribute' => '57',
'attribute_name' => 'M',
'group_name' => 'Size',
'public_group_name' => 'Size',
'group_type' => 'radio',
'attribute_color' => '',
'quantity' => '5555',
),
3 =>
array (
'id_product_attribute' => '56',
'attribute_name' => 'XL',
'group_name' => 'Size',
'public_group_name' => 'Size',
'group_type' => 'radio',
'attribute_color' => '',
'quantity' => '5555',
),
4 =>
array (
'id_product_attribute' => '58',
'attribute_name' => 'XL',
'group_name' => 'Size',
'public_group_name' => 'Size',
'group_type' => 'radio',
'attribute_color' => '',
'quantity' => '5555',
),
5 =>
array (
'id_product_attribute' => '56',
'attribute_name' => 'Grey',
'group_name' => 'Color',
'public_group_name' => 'Color',
'group_type' => 'color',
'attribute_color' => '#AAB2BD',
'quantity' => '5555',
),
6 =>
array (
'id_product_attribute' => '59',
'attribute_name' => 'Grey',
'group_name' => 'Color',
'public_group_name' => 'Color',
'group_type' => 'color',
'attribute_color' => '#AAB2BD',
'quantity' => '5555',
),
7 =>
array (
'id_product_attribute' => '57',
'attribute_name' => 'Grey',
'group_name' => 'Color',
'public_group_name' => 'Color',
'group_type' => 'color',
'attribute_color' => '#AAB2BD',
'quantity' => '5555',
),
8 =>
array (
'id_product_attribute' => '58',
'attribute_name' => 'Grey',
'group_name' => 'Color',
'public_group_name' => 'Color',
'group_type' => 'color',
'attribute_color' => '#AAB2BD',
'quantity' => '5555',
),
9 =>
array (
'id_product_attribute' => '60',
'attribute_name' => 'Yellow',
'group_name' => 'Color',
'public_group_name' => 'Color',
'group_type' => 'color',
'attribute_color' => '#F1C40F',
'quantity' => '9565',
),
10 =>
array (
'id_product_attribute' => '56',
'attribute_name' => '40x60cm',
'group_name' => 'Dimension',
'public_group_name' => 'Dimension',
'group_type' => 'radio',
'attribute_color' => '',
'quantity' => '5555',
),
11 =>
array (
'id_product_attribute' => '57',
'attribute_name' => '40x60cm',
'group_name' => 'Dimension',
'public_group_name' => 'Dimension',
'group_type' => 'radio',
'attribute_color' => '',
'quantity' => '5555',
),
12 =>
array (
'id_product_attribute' => '58',
'attribute_name' => '60x90cm',
'group_name' => 'Dimension',
'public_group_name' => 'Dimension',
'group_type' => 'radio',
'attribute_color' => '',
'quantity' => '5555',
),
13 =>
array (
'id_product_attribute' => '59',
'attribute_name' => '60x90cm',
'group_name' => 'Dimension',
'public_group_name' => 'Dimension',
'group_type' => 'radio',
'attribute_color' => '',
'quantity' => '5555',
),
)
Так вот как мне можно конкатенировать название атрибуту по ключу attribute_name
чтобы вышло типо
array (
0 =>
array (
'id_product_attribute' => '60',
'attribute_name' => 'S, Yellow',
'group_name' => 'Size',
'public_group_name' => 'Size',
'group_type' => 'radio',
'attribute_color' => '#F1C40F',
'quantity' => '9565',
),
1 =>
array (
'id_product_attribute' => '59',
'attribute_name' => 'M, Grey, 60x90cm',
'group_name' => 'Size',
'public_group_name' => 'Size',
'group_type' => 'radio',
'attribute_color' => '#AAB2BD',
'quantity' => '5555',
),
2 =>
array (
'id_product_attribute' => '57',
'attribute_name' => 'M, Grey, 40x60cm',
'group_name' => 'Size',
'public_group_name' => 'Size',
'group_type' => 'radio',
'attribute_color' => '#AAB2BD',
'quantity' => '5555',
),
3 =>
array (
'id_product_attribute' => '56',
'attribute_name' => 'XL, Grey, 40x60cm',
'group_name' => 'Size',
'public_group_name' => 'Size',
'group_type' => 'radio',
'attribute_color' => '#AAB2BD',
'quantity' => '5555',
),
4 =>
array (
'id_product_attribute' => '58',
'attribute_name' => 'XL, Grey, 60x90cm',
'group_name' => 'Size',
'public_group_name' => 'Size',
'group_type' => 'radio',
'attribute_color' => '#AAB2BD',
'quantity' => '5555',
),
Если это вообще реально?