compact()
compact - Create array containing variables and their values
Syntax
array compact (
mixed $varname,
mixed $...)
Arguments
- varname - compact() takes a variable number of parameters. Each parameter can be either a string containing the name of the variable, or an array of variable names. The array can contain other arrays of variable names inside it; compact() handles it recursively.
- ...
Description
Creates an array containing variables and their values.
Version
PHP 4, 5
Return value
Returns the output array with all the variables added to it.