I have loaded a node object in my module, I want to get the single value entered for a specific field (a text field).
I can access it directly with
Is there a better way to do this? I have looked at field_get_items and field_view_value but I dont want a renderable array or an array at all. Isn't there a way to just return the string value? Having
$items = field_get_items('node', $node, 'field_position'); $position = $items[safe_value];
just seems like additional code that doesnt make it any simpler