Using a computed field: How to extract a field value from a referenced node into field collection. (Multiple value) I have written this code inside a computed field, which has given me as result,
the referenced entity numbers how are saved in the field as an array.

I would like to know how to extract from the entity number a specific field, such as the title.

foreach ($entity-&gt;field_campos as $field) {
} 
foreach ($field as $index =&gt; $valores) {
$terminos[] = $valores['value'];
}
$item2 = field_collection_item_load_multiple($terminos, $reset = FALSE);
foreach ($item2 as $indice =&gt; $values) {
$entity_field[]['value'] = $values-&gt;field_nombre_2['und'][0]['target_id'];
}

// Display code (PHP).
$display_output = $entity_field_item['value'];


I am using Drupal 7.
You can do something like this:

$referenced_titles = array(); 

foreach ($item2 as $indice =&gt; $values) {

  // use node_load($nid) to load the node. 
  $referenced_node = node_load($values-&gt;field_nombre_2['und'][0]['target_id']);
  $referenced_titles[] = $referenced_node-&gt;title;

}