function variable_get

cis7 variable_get($name, $default = NULL)
cle7 variable_get($name, $default = NULL)
elmsmedia7 variable_get($name, $default = NULL)
icor7 variable_get($name, $default = NULL)
meedjum_blog7 variable_get($name, $default = NULL)
mooc7 variable_get($name, $default = NULL)

Returns a persistent variable.

Case-sensitivity of the variable_* functions depends on the database collation used. To avoid problems, always use lower case for persistent variable names.


$name: The name of the variable to return.

$default: The default value to use if this variable has never been set.

Return value

The value of the variable. Unserialization is taken care of as necessary.

See also



1618 calls to variable_get()
@print_mail_form in sites/all/modules/local_contrib/print/print_mail/
Menu callback for the send by email form.
@print_mail_settings in sites/all/modules/local_contrib/print/print_mail/
Menu callback for the send by email module settings form.
accessibility_content_admin_form in sites/all/modules/ulmus/accessibility/modules/accessibility_content/
accessibility_content_field_widget_form_alter in sites/all/modules/ulmus/accessibility/modules/accessibility_content/accessibility_content.module
Implements field_widget_form_alter().
accessibility_content_init in sites/all/modules/ulmus/accessibility/modules/accessibility_content/

... See full list

1 string reference to 'variable_get'
system_test_menu in modules/simpletest/tests/system_test.module
Implements hook_menu().


includes/, line 951
Functions that need to be loaded on every Drupal request.


function variable_get($name, $default = NULL) {
  global $conf;

  return isset($conf[$name]) ? $conf[$name] : $default;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.