flatten.php
Table of Contents
Functions
- flatten() : array<string|int, mixed>
- Flattens a nested array into a single-level array.
Functions
flatten()
Flattens a nested array into a single-level array.
flatten(array<string|int, mixed> $array) : array<string|int, mixed>
This function recursively iterates through the nested arrays, concatenating all nested values into one flat array.
Parameters
- $array : array<string|int, mixed>
-
The array to flatten.
Tags
Return values
array<string|int, mixed> —The flattened array, containing all nested values in order.