I am trying to Merge same column in two different array, Array2 is the part of Array1, for some updation on PartyName column I am fetching that column from main array1 using array_column then applying some modification to array2 then want to merge it again. like
Array1:
Array
(
[0] => Array
(
[StorePartyId] => 10462791
[StoreId] => 4
[PartyName] => AMAR MEDICO
[PartyCode] => 6840
)
[1] => Array
(
[StorePartyId] => 10463839
[StoreId] => 4
[PartyName] => NEW SAVE MEDICINE SHOPEE
[PartyCode] => 8236
)
)
Array2:
Array
(
[0] => Array
(
[PartyName] => AMAR MEDICO_updated
)
[1] => Array
(
[PartyName] => NEW SAVE MEDICINE SHOPEE_updated
)
)
I can programmatically merge this two array by looping each other. but looking for some inbuilt function of php array. I tried array_merge function but it does not resolve this.
FinalArray
final array should look like this
Array
(
[0] => Array
(
[StorePartyId] => 10462791
[StoreId] => 4
[PartyName] => AMAR MEDICO_updated
[PartyCode] => 6840
)
[1] => Array
(
[StorePartyId] => 10463839
[StoreId] => 4
[PartyName] => NEW SAVE MEDICINE SHOPEE_updated
[PartyCode] => 8236
)
)