Wednesday, 29 August 2018
Subscribe to:
Post Comments (Atom)
vdump($inv_new);
array(1) {
[0] => array(6) {
'StoreNumber' → str•3 '11 '
'SupplierNumber' → str•4 '6303'
'InvoiceNumber' → str•11 'DI613718812'
'ReasonCode' → str•4 'Dept'
["ReasonNote"] → NULL
["ResolutionCode"] → NULL
}
}
vdump($inv_h);
array(30) {
....
[22] => array(5) {
'org_id' → str•2 '11'
'org_number' → str•2 '11'
'supplier_number' → str•4 '6303'
'supplier_name' → str•27 'BLAH'
'invoice_number' → str•11 'DI613718812'
}
array(30) {
....
[22] => array(8) {
'org_id' → str•2 '11'
'org_number' → str•2 '11'
'supplier_number' → str•4 '6303'
'supplier_name' → str•27 'BLAH'
'invoice_number' → str•11 'DI613718812'
'ReasonCode' -> str 4 'Dept'
["ReasonNote"] -> NULL
["ResolutionCode"] -> NULL
}
array_merge()
on the elements to copy the fields.foreach ($inv_new as $inv1) {
foreach ($inv_h as &$inv2) {
if ($inv1['StoreNumber'] == $inv2['org_id']
&& $inv1['SupplierNumber'] == $inv2['supplier_number']
&& $inv1['InvoiceNumber'] == $inv2['invoice_number']) {
$inv2 = array_merge($inv1, $inv2);
break;
}
}
}
Hello Friends! I am Ramana a part time blogger from Hyderabad.
0 comments:
Post a Comment