如何访问字段集合中的项目(Drupal 7)

I am trying to access image uri's in an array within a field collection but I don't know how to access them. If I look in the devel module, I can see the location of the first image uri in the array looks like this:

['field_text_and_image'][0]['entity']['field_collection_item'][2474]['field_about_accreditation_image'][0]['#item']['uri']

I am puzzled because I have 'field_get_items' method to access the field collection I am targeting like so...

$text_and_image_field = field_get_items('node', $node, 'field_text_and_image');

... and if I print/render this variable, I would expect to see an array printed on the page but instead nothing gets created. However, I made a condition on the page that checks to see if the '$text_and_image_field' field collection exists, and if it does to create an element, and it does indeed create an element which shows that the field exists. I just can't seem to access any of it's content.

So, why isn't the field collection printing anything and how can I loop through the 'field_about_accreditation' array to print out all of the image uri's?

EDIT*

I've taken a few more stabs at the problem and realized that I made the mistake of trying to render the value of the '$text_and_image_field' when I should have been using print_r, which now doing so gives me this array value:

Array ( [0] => Array ( [value] => 2474 [revision_id] => 174439 ) )

Based on older code where field collections are accessed, what has happened every other time a value has been assigned to a field collection is to write the following statements:

$value = field_view_value('node', $node, '$field_text_and_image', $text_and_image_field[$i]);
$field_collection = $value['entity']['field_collection_item'][key($value['entity']['field_collection_item'])];

However, when I try to print out $value (which I expect would be '2474') nothing is displayed.

Hi field collections are stored as a seperate entity so you will need to do an entity load to get the data.

$text_and_image_field = entity_load('field_collection_item', array($entity_id));

In this case it looks like the entity id is 2474 from there you can manipulate the array as you need to.

Your end code could be something like so:

$imageuri = entity_load('field_collection_item', array(2474))[2474]->field_about_accreditation_image['und'][0]['uri'];

Let' say that you have loaded $node and inside it you have field collection field field_images. Then you can get first element of it as:

$collection_entity_id = $node->field_photo['und'][0]['value'];

Now you have entity id and you have to load full entity:

$full_entity = field_collection_item_load($collection_entity_id);

And whey you loaded entity you can access entity fields the usual way:

$title = $full_box->title;
$image_path =- $full_entity->field_image_path['und'][0]['value'];

And yes, I know it's not cleanest way to get the values, please don't rub it in my face.