print_r in drupal_set_message
February 19, 2009
Description
This example will print our human readable information about the $_SESSION inside a drupal_set_message. You can replace the $_SESSION with any other variable or array (or object).
Snippet
drupal_set_message(print_r($_SESSION,true));
Enhancement
This version makes the output easier to read:
Post new comment