ArrayUtils
class ArrayUtils
Class ArrayUtils
Methods
Flatten an array to leave it at a single level.
Add the elements of the 2nd array behind those of the first.
Return true if $param is setted and is 'yes', otherwise return false.
Given an array of parameters, an index and a possible default value, returns a literal of the form: index = 'value'.
Array recursive merge excluding duplicate values.
Details
at line 25
static array
flatArray(array $array)
Flatten an array to leave it at a single level.
Ignore the value of the indexes of the array, taking only the values. Remove spaces from the result and convert it to lowercase.
at line 47
static array
addToArray(array $initialArray, array $nextArray)
Add the elements of the 2nd array behind those of the first.
at line 64
static bool
isTrue(array $param, string $key)
Return true if $param is setted and is 'yes', otherwise return false.
at line 80
static string
getItem(array $itemsArray, string $itemIndex, string|null $defaultValue =
null)
Given an array of parameters, an index and a possible default value, returns a literal of the form: index = 'value'.
It is used, for example, to assign attributes to an html statement.
at line 96
static array
arrayMergeRecursiveEx(array $array1, array $array2)
Array recursive merge excluding duplicate values.