Programmatically creating/deleting/modifying field-collection item for the node
Field-collection (http://drupal.org/project/field_collection) is one of the most useful module in drupal7. Field-collection implements entity api which allow us to use it very flexibly on admin(UI) level as well as on code level.
Bellow is the example for dynamically creating/deleting/modifying field-collection item for any node.
Suppose 'field_page_collection1' is the field collection for the 'page' content type having two text fields 'field_page_collection1_text1', 'field_page_collection1_text2'.



