Render array to markup after submitting a form In my Drupal 7 custom moudle, i would like to output result of form as an formatted array.
Simmilar like you can print_r or printf arrays.

 $form['results'] = array(
            '#type'     =&gt; 'item',
            '#markup'   =&gt; $form_state['temporary']
)


so  $form_state['temporary'] is array, but i do not want "array" text to show up but formatted array representation, whatewer is in it.

Thanks!
Just try like:

'#markup' =&gt; '&lt;pre&gt;'.print_r($form_state['temporary'], true).'&lt;/pre&gt;';


you could just save the print_r() value to variable and then output that to a Div or something ...