fetch(url, {
method: 'POST',
headers: {
'Authorization': 'Basic base64codedloginadpassword==',
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
"mode":"cors"
});
foreach($_POST['orange'] as $k=>$orange) {
$pink = $_POST['pink'][$k];
$blue = $_POST['blue'][$k];
//do something with $orange, $pink, $blue
}
$attached = array_diff($new, $old);
$deleted = array_diff($old, $new);