Get info from entity reference using PHP I'm trying to use PHP to get user IDs from an Entity Reference of users in a content type.

I have got as far as doing (where I actually get the NID from elsewhere):

$node = node_load(123);

$info = field_get_items('node', $node, 'field_my_users');


But how do I get the IDs from $info?
You just need to get the target_id from each of the field values, which you can do by looping through $info:

$uids = array();
foreach ($info as $field_item) {
  // Entity reference fields store their data in the 'target_id' column
  $uids[] = $field_item['target_id'];
}