I don't even know what words to use :)
I have this one array:
array(
0 => array(
'protein' => 'proteiny',
'total_fat' => 'total faty',
'carbohydrates' => 'carbohydrates',
'food_energy' => 'food energy',
...
And another array:
1 => array(
'protein' => 'grams',
'total_fat' => 'grams',
'carbohydrates' => 'grams',
'food_energy' => 'kcals',
...
And i want to combine them into a new array in this structure:
$newone = array(
array('slug' => 'protein', 'name' => 'proteiny', 'format' => 'grams'),
array('slug' => 'total_fat', 'name' => 'total faty', 'format' => 'grams'),
array('slug' => 'carbohydrates', 'name' => 'carbohydrates', 'format' => 'grams'),
array('slug' => 'food_energy', 'name' => 'food energy', 'format' => 'kcals'),
...
IS there any way to do that?