If the users have auto generated ID's, i.e: in MySql, you should include the user index in the field name. I prefer to use a foreach loop to traverse the array but you way is sufficient.
Don't forget to ensure that the data is an array first.
PHP Code:
<input type='text' name='address[<?php echo($row['userId']) ?>]' size='12'>
So your field looks like this:
HTML Code:
<input type='text' name='address[1]' size='12'>
To traverse the array, checking it is an array first:
PHP Code:
if (is_array($_POST['address'])) {
foreach($_POST['address'] as $userId => $address) {
/* code here */
}
}