Ok, I have found why my first aproach doesn't work. It seems the
$selected = (($value["ID"]) === ($row["ID"]) ? 'selected' : '');
$UserID = (($value["ID"]) === ($row["ID"]) ? $value["Name"] : '');
lines keep looping when in a while loop until the last item in the array is looked at. Therefore the value of the variable will always be the value of the last entry in the array.
I have only entered this finding in the hope it helps others in the same situation - sorry no fix yet.
ac3mark - I havent had chance to look into your last suggestion. I will get onto it next week - unfortunately the wife wants to go on holiday!