bookmark_borderrgempty()

Description

Checks if a variable is empty. Can check if a variable is empty, an array is empty, or a key within an array is empty.

Usage

rgempty( $name, $array );

Parameters

  • $name string

    The variable that you are checking.

  • $array array

    If checking if a key within an array is empty, this parameter contains your array.

Examples

Checking for a null variable.

// This would return _true_ as the _$name_ variable is null.
$name = null;
rgempty( $name );
// This would return _true_ as the key assigned to _$name_ doesn't exist.
$name = 'empty_key';
$array = array(
   'key1' => 'value1',
   'key2' => 'value2',
   'empty_key' => ''
);
rgempty( $name, $array );

Source Code

This function is located in gravityforms.php