I have been using this code in Drupal 7 to get value of a node's field:
$node = node_load($nid);
$rate = $node->field_rate[und][0][value];
How to get $rate value without using this long array syntax?
After research i get
$field = field_get_items('node', $node, 'field_rate')
$rate = $field[0]['value'];
But it is still long if i need to get n number of fields.