Render array
Updated: 08/02/2020 by Computer Hope
A render array is a fundamental building block of the Drupal content management system. It is an associative array of data structures containing the content of a web page. The array contains the data itself, and hints about how it should be "rendered."
When a web page is served, the data is formatted for display, using the associated hints, according to a theme. This separation the value of data, and how it is presented, provides flexibility in globally modifying the site's appearance and function.
The following is an example of a simple Drupal render array:
<?php $page = array( '#show_messages' => TRUE, '#theme' => 'page', '#type' => 'page', 'content' => array( 'system_main' => array(...), 'another_block' => array(...), '#sorted' => TRUE, ), 'sidebar_first' => array( ... ), 'footer' => array( ... ), ... ); ?>