This is driving me crazy it just sounds simple, but I cannot find the answer.
I have a field collection in a content type called
field_collection_mine how you now while creating the node you can add elements to the field collection.
I have tried this:
$wrapper = entity_metadata_wrapper($entity_type, $entity); $wrapper->field_collection_mine = array(); entity_save('field_collection_item',$wrapper);
The code above delete all the elements within the field collection, but that is now what I want!! I just want to delete for example the last element. E.g:
- Field Collection mine
How can I for example delete just the element 3? The above code deletes all the elements, so
field_collection_mine is left empty.