viewing fields with field_view_field after EntityFieldQuery doesn't work I'm using an EntityFieldQuery to load a node and try to access some of its fields, but can't seem to get any of the fields. The code is below:

$nodestoload = $query-&gt;execute();
$nids = array_keys($nodestoload['node']);
$nodes = entity_load('node', $nids);
print_r($nodes);
$output = field_view_field('node', $nodes, 'suppliername');


However, $output is returning an empty array. I can see that the node loads using the print_r. I've also tried various options (such as replacing 'node' with the actual bundle type). But nothing seems to be working... How do I access fields from a node that I loaded programmatically?
Your code will only work if there is only a single value returned by your EFQ. Whatever you want to do with the nodes, you need to put in a foreach():

$nodestoload = $query-&gt;execute();
foreach ($nodestoload as $loaded_node) {
  $nid = array_keys($loaded_node['node']);
  $node = entity_load('node', $nid);
  print_r($node);
  $output = field_view_field('node', $node, 'suppliername');
}