I installed the Field ollection module in a Drupal 7 site and I added a multi-field (unlimited) field collection with three items.
I need to programmatically delete the field collection.
I used the following code, which does not work.
$field_collection_delete = $node->field_accommodation['und'][$j]['value'];
entity_delete_multiple('field_collection_item', array($field_collection_delete));
The value in the field collection item is deleted from the database, but the field collection field I added in the content type is still in the database.
I need to delete that too.
What code do I need to use to make it happen?