Show all values for a field collection in node.tpl.php I have a problem with theming field collection. I want to create a loop and I have a field called field_earth inside field_helloworld that displays unlimited images. The following code doesn't show any image.

&lt;?php
  $counter = 1;
  foreach ($node-&gt;field_helloworld['und'] as $key =&gt; $value) {
    $field_collection = entity_load('field_collection_item', array($value['value']));
    $idx = $value['value'];
?&gt;
  &lt;p&gt;
    &lt;small&gt;&lt;?php print $counter; ?&gt;&lt;/small&gt;
    &lt;?php print $field_collection[$idx]-&gt;field_venus['und'][0]['value'];?&gt;
  &lt;/p&gt;
  &lt;div&gt;
    &lt;?php print $field_collection[$idx]-&gt;field_earth['und']['0'][value];?&gt;
  &lt;/div&gt;
  &lt;?php $counter++; ?&gt;
&lt;?php  } ?&gt;


Can anyone show me how to display all images?
/**
 * @Show all field collection values from node object
 *  Example field collection name: "field_helloworld"
 *  Example fields within a field collection:
 *  - field_title       (string)
 *  - field_image       (image)
 *  - field_description (string)
 */


// get field collections from node 
$field_helloworld = field_get_items('node', $node, 'field_helloworld');

// get all fields values if collection exists
if (!empty($field_helloworld)){
    $field = field_view_value('node',$node, 'field_helloworld', $field_helloworld[0]);  
    foreach ($field['entity']['field_collection_item'] as $id =&gt; $field_collection){

        // load the field collection item entity
        $field_collection_item = field_collection_item_load($id);
        // wrap the entity and make it easier to get the values of fields
        $field_wrapper = entity_metadata_wrapper('field_collection_item', $field_collection_item);

        // all values from a field collection
        $field_title        = $field_wrapper-&gt;field_title-&gt;value();
        $field_image        = $field_wrapper-&gt;field_image-&gt;value(); // an array of image data
        $field_description  = $field_wrapper-&gt;field_description-&gt;value(); 

        // an example of getting image url from field_image
        $image_url          = $field_image['uri'] ? file_create_url($field_image['uri']) : '';
    }
}


Notice that there is no ['und']['0'][value].