I'm trying to figure out if a node already exist, I'm using the following code
$query = new EntityFieldQuery;
$result = $query
->entityCondition('entity_type', 'node')
->propertyCondition('type', 'item')
->propertyCondition('title', $full_name)
->execute();
if (!empty($result['node'])) {
// do something
}
The problem is this, when a result is returned, the structure of the result is this
Array
(
[node] => Array
(
[96] => stdClass Object
(
[nid] => 96
[vid] => 96
[type] => item
)
)
)
I'm trying to get the nid, but I can't figure out how to access it $
result['node'][0]
does not work. How do I get the nid in this situation