Show post/page into div using function

I’m not sure what ARRAY_A is supposed to be, seems unnecessary unless there’s more info we’re missing. Also, get_post returns an object, not an array. Try this:

function fields_after_order_details(){
  $my_id = 2731;
  $post_id_2731 = get_post($my_id);
  $title = $post_id_2731->post_content;
  echo '<div class="tandc">' . $title . '</div>';

}