Shrike, thanks for the reply.
The $res variable is set before the POST variables are set: The foreach loop gets iterated when the page load, before any form submission is made. Granted I've used the same variable name in two places in the code, but changing that doesn't avert the error.
Why do you need to declare arrays before using them? The manual states:
You can also modify an existing array by explicitly setting values in it. This is done by assigning values to the array while specifying the key in brackets. You can also omit the key, add an empty pair of brackets ("[]") to the variable name in that case.
$arr[key] = value;
$arr[] = value;
// key may be an integer or string
// value may be any value
If $arr doesn't exist yet, it will be created.
Is there something that has changed between versions to modify this behaviour?
regards, njm