@justsomeguy, Thanks, that worked. I am curious as to why if I used the value of $key in stead of the variable e.g. $profile->field_first_name[0]['value'] = $value; that this worked. I would have thought that the arrays were created when I loaded the $profile object (earlier in the script). I have a similar script where I reference all the object properties by name instead of using a variable as part of the name and they all work??? Oh well, this fixes the issue. Thanks very much. Dave.