Minimize an array to remove empty values
Usage
// basic usage
$array = $sanitizer->minArray(array $data);
// usage with all arguments
$array = $sanitizer->minArray(array $data, $allowEmpty = false, bool $convert = false);
Arguments
Name | Type(s) | Description |
---|---|---|
data | array | Array to reduce |
allowEmpty (optional) | bool, array | Should empty values be allowed in the encoded data? Specify any of the following:
|
convert (optional) | bool | Perform type conversions where appropriate? i.e. convert digit-only string to integer (default=false). |
Return value
array
$sanitizer methods and properties
API reference based on ProcessWire core version 3.0.236