How can I get all options for a fields?

For example, There is a field with 3 options in allowed values, like option1, option2, option3.Is there any function which receive the field name and returns selected values not a keys ?

With this just return key of selected opinion

  print ($node->field_opinion['und'][0]['value'])

Comments

Subhransu.addweb’s picture

You can run foreach loop and get desired result.