$original array [['type_of_activity'=>'م.ص','total'=>'0' ],['type_of_activity'=>'م.و','total'=>'0'],['type_of_activity'=>'م.ن','total'=>'0'],['type_of_activity'=>'م.خ','total'=>'0'],['type_of_activity'=>'م.ت','total'=>'0'],['type_of_activity'=>'و.ش','total'=>'0'],['type_of_activity'=>'ق.ع','total'=>'0'],
['type_of_activity'=>'م.و','total'=>'0'],['type_of_activity'=>'م.غ','total'=>'0'],['type_of_activity'=>'س.ن','total'=>'0'],['type_of_activity'=>'ح.ف','total'=>'0']]
that there areport based on this value
the return array from DB my be ['type_of_activity'=>'م.و','total'=>'5'],['type_of_activity'=>'م.غ','total'=>'10'],['type_of_activity'=>'س.ن','total'=>'15']
is there a way to map this array to the original array where the match keys
without losing any key or value
the result will be just 11 arrays within the original
[['type_of_activity'=>'م.ص','total'=>'0' ], [['type_of_activity'=>'م.ع','total'=>'0' ], ['type_of_activity'=>'م.و','total'=>'5'],['type_of_activity'=>'م.ن','total'=>'0'],['type_of_activity'=>'م.خ','total'=>'0'],['type_of_activity'=>'م.ت','total'=>'0'],['type_of_activity'=>'و.ش','total'=>'0'],['type_of_activity'=>'ق.ع','total'=>'0'], ['type_of_activity'=>'م.غ','total'=>'10'],['type_of_activity'=>'س.ن','total'=>'15'],['type_of_activity'=>'ح.ف','total'=>'0']],