Documentation

firstNotEmpty

mixed|string public static
\Bitrix\Main\Type\Collection::firstNotEmpty(
 array $a,
 string|integer $k,
 mixed $a,...
);

Static method allocated all arguments and keys in pairs.

Uneven arguments - arrays, even - keys, used for searching in arrays.

Keys can be arrays. In this case, search is performed in nested arrays. Returns first non-empty element within the argument/key pair.

Parameters

ParameterDescriptionVersion
$aArray for analysis
$kSearch keys
$a,...Unlimited sequentially checked array/keys pairs.

Example



© «Bitrix24», 2001-2024
Up