Skip navigation
Help

variable_get

6 bootstrap.inc variable_get($name, $default)
7 bootstrap.inc 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.

Parameters

$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.

See also

variable_del()

variable_set()

868 calls to variable_get()

1 string reference to 'variable_get'

File

drupal/includes/bootstrap.inc, line 758
Functions that need to be loaded on every Drupal request.

Code

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

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