Field Collection

Description  :

Provides a field-collection field, to which any number of fields can be attached.

A field collection is internally represented as an entity, which is embedded in the host entity. Thus, if desired field collections may be viewed and edited separately too.

Download:

https://drupal.org/project/Field_Collection

Video Link :

Syntax:

To Display Field Collection

$formtype = field_get_items(‘node’, $node, ‘field_non_rohs’);

foreach($formtype as $itemid) {
$item = field_collection_field_get_entity($itemid);

To Display Field Collection in a Field Collection

$formtype1 = field_get_items(‘field_collection_item’, $item, ‘field_safety_standard_non_rohs’);
foreach($formtype1 as $itemid1) {
$item1 = field_collection_field_get_entity($itemid1);