Load fields from a node which reference an entity I have a node with a entity reference field (more precisely a product reference). How do I access the fields of the referenced entity from the node?

(I’m trying to do it through a code field in the Display Suite, so I have access to the $entity object, not sure if that helps)

To explain better I would like to be able to do something like these tokens:

[node:field-products:0:field-flow-rate]
[node:field-products:1:field-flow-rate]
[node:field-products:2:field-flow-rate]


but with PHP, so I can cycle through the index.
You can use entity_metadata_wrapper() to easily get referenced entities, their field and much more.

$node_wrapper = entity_metadata_wrapper('node', $entity);

foreach ($node_wrapper-&gt;field_products as $product_wrapper) {
  // You can print or do whatever you like with the value of the fields 
  // of the referenced entity like below:
  print $product_wrapper-&gt;field_flow_rate-&gt;value();
}