So far the answers I have found is all about one associative array + one indexed array. I got two associative arrays like the below:
$updates = array (
array ( 'value' => $check_first ),
array ( 'value' => $check_second )
);
$conditions = array (
array ( 'name' => 'enable' ),
array ( 'name' => 'picked' )
);
I wanna use foreach to update the wpdb database like below but it doesn't work, yeah I know foreach won't work like this, any other solution?
foreach ( $updates as $names_1 => $update ) {
foreach( $conditions as $names_2 => $condition ) {
$wpdb -> update ( $table_name, $update, $condition );
}
}