Ok.
I have moved the closed if statement to line 135. The first record (the record with id 1523) is updated as it should be, the other records are not. The output is now:
region: 7
SQL: UPDATE `gavesoknader` SET `Prioritering` = '5' WHERE `Id`=1523
array(124) {
["WADA_RepeatID_Id_0"]=>
string(4) "1523"
["Prioritet_0"]=>
string(1) "5"
["WADA_RepeatID_Id_2"]=>
string(4) "1522"
["Prioritet_2"]=>
string(1) "6"
["WADA_RepeatID_Id_4"]=>
string(4) "1521"
["Prioritet_4"]=>
string(1) "7"
["WADA_RepeatID_Id_6"]=>
string(4) "1520"
["Prioritet_6"]=>
string(0) ""
["WADA_RepeatID_Id_8"]=>
string(4) "1519"
["Prioritet_8"]=>
string(0) ""
["WADA_RepeatID_Id_10"]=>
string(4) "1517"
["Prioritet_10"]=>
string(0) ""
I'm attching my updated file.
Regards
Rune