You are here

function variable_get in Drupal 6

Same name and namespace in other branches
  1. 4 includes/ \variable_get()
  2. 5 includes/ \variable_get()
  3. 7 includes/ \variable_get()

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.

See also

variable_del(), variable_set()

285 calls to variable_get()
actions_do in includes/
Perform a given list of actions by executing their callback functions.
aggregator_admin_settings in modules/aggregator/
Form builder; Configure the aggregator system.
aggregator_categorize_items in modules/aggregator/
Form builder; build the page list form.
aggregator_filter_xss in modules/aggregator/aggregator.module
Safely render HTML content, as allowed.
aggregator_page_categories in modules/aggregator/
Menu callback; displays all the categories used by the aggregator.

... See full list


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


function variable_get($name, $default) {
  global $conf;
  return isset($conf[$name]) ? $conf[$name] : $default;