drupal_get_messages

Definition

drupal_get_messages()
includes/bootstrap.inc, line 618

Description

Return all messages that have been set.

As a side effect, this function clears the message queue.

Code

<?php
function drupal_get_messages() {
  $messages = drupal_set_message();
  $_SESSION['messages'] = array();

  return $messages;
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.