Inhaltsverzeichnis

getVariables()

array getVariables()
array getVariables(string Filter)
array getVariables(array Filter)

The function getVariables() returns a list of variable names matching the filter $filter. If no filter is specified, the function returns a list of all variables in the question catalogue.

Return value

The function returns an array with variable names. If individual variable names have been assigned for the variables in the variable catalogue, these are used.

Example

// Return variables of a single category
$vars = getVariables('AB');
debug($vars);
 
// Return variables of a category and of two questions
$vars = getVariables(['AB', 'BC02', 'BC03']);
debug($vars);
 
// Denote a filter that is delimited by a comma
$vars = getVariables('AB,BC02,BC03');
debug($vars);
 
// Return all variables from the question catalogue
$vars = getVariables();
debug($vars);

The function debug(), for example, displays the identified variable list in the debug mode.