How to add a value to an entity reference field set to unlimited values using entity metadata wrapper Im new to drupal and im trying to perform this operation, can some one help me on how can i add a new value to an entity reference field that its been set to hold unlimited values using the entity metadata wrapper only
this is what i have tried

$ewrapper-&gt;entity-reference-field-&gt;set($value);


this will overwrite the current value and i want to add to it
$wrapper-&gt;field_foobar[] = $additional_value;

Just change field_foobar to the machine name of your entity reference field.

The empty brackets insure a new value is added rather than overwriting existing value(s).

Good luck!