variable_get

Definition

variable_get($name, $default)
includes/bootstrap.inc, line 420

Description

Return a persistent variable.

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.

Code

<?php
function variable_get($name, $default) {
  global $conf;

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

Drupal is a registered trademark of Dries Buytaert.