Displaying field values with formatting

Displaying data for any entity fields with formatting can be achieved with 2 simple drupal api.

field_get_items: Returns the field items in the language they currently would be displayed.
field_view_value: Returns a renderable array for a single field value.

Example:

<?php
$status_field
= field_get_items('node', $node, 'field_status');
print
render(field_view_value('node', $node, 'field_status', $status_field[0]));
?>

--
Source
https://api.drupal.org/api/drupal/modules%21field%21field.module/functio...
https://api.drupal.org/api/drupal/modules!field!field.module/function/fi...