How to update a field's value? Like the field_get_items function, is there a function to update a field's value? I want to update a field of type user reference.
In this example I load a node and change the value of a field called field_context and then saves the updated node:

$node = node_load($nid);
$node-&gt;field_context[$node-&gt;language][0]['value'] = 'foo';
node_save($node);


Use var_dump to show what fields your node contains.