我什至不知道该用什么词:)
我有一个数组:
array(
0 => array(
'protein' => 'proteiny',
'total_fat' => 'total faty',
'carbohydrates' => 'carbohydrates',
'food_energy' => 'food energy',
...
另一个数组:
1 => array(
'protein' => 'grams',
'total_fat' => 'grams',
'carbohydrates' => 'grams',
'food_energy' => 'kcals',
...
我想在这个结构中将它们组合成一个新数组:
$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'),
...
有没有办法做到这一点?
翻翻过去那场雪
MYYA