Retrieve data from Field API programmatically I have a custom field called phone_number for the user. I need to retrieve the data in it from the database and use it to call other functions. I've looked through the Field API and I can't find the specific function. I read somewhere in the Field Attach API that most of the functions there take $entity as a variable but none of the functions there gives me what I need. Please help.
Use Field data extraction API module to accomplish your job of field data extraction.

As per the documentation, you have to write this in yourmodule

  $phonenumbers = field_extract_values('node', $node, 'phone_number');

  $result = someCustomFunction($phonenumbers);

  function someCustomFunction($user_phonenumbers){

   // Do something here and return value

   }