match and update acf fields with array values

i created array from gravity forms entries that has information about students payment.
this array contains only the values i need about payments.
$arr:

[6047] => Array
(
[0] => transaction_id
[1] => transaction_status
[2] => payment_amount
),
[6048] => Array
(
[0] => transaction_id
[1] => transaction_status
[2] => payment_amount
)

i used the common value of student_id as the key (6047 is student post id).
And i have a custom post type with student information. every student is a post field with advance custom fields.

how can i push the array data to the ACF fields where the student_id = $arr[$key].
all i have is this:

//$arr this is the array variable.
// Get all the Students:
$add_entry_loop = new WP_Query($srgs);

while ($add_entry_loop->have_posts()) {
$add_entry_loop->the_post();

foreach ($key as $value) {
// do something
}
}
return $payment_info_array;
}
}

Read more here:: match and update acf fields with array values

Leave a Reply

Your email address will not be published. Required fields are marked *