flat()
The flat() method creates a new array with all sub-array elements concatenated into it recursively up to the specified depth.
Example.php
Syntax
Parameter
The depth level that should be flattened. Default is
1
.
Return value
A new array with the sub-array elements concatenated into it.
Prefixing
References
Last updated