rgempty()

rgempty()

DescriptionUsageParametersExamplesChecking for an empty array.Source Code

Description
Checks if an array or key within an array is empty.
Usage
rgempty( $name, $array );

Parameters

$name string
The array or key to be checked.

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

Examples
Checking for an empty array.
// This would return _true_.
$name = array();
rgempty( $name );

// This would return _false_.
$name = array( 'something' );
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

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注