ashvedov / array-flatten
array flatten
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ashvedov/array-flatten
README
Descriptions
The package allows you to convert a simple numbered array of any nesting to a simple one-dimensional (without nesting) array
Getting started
Requirements
- PHP 8.1
- Composer 2+
Installation
composer require ashvedov/array-flatten
Usage
Anywhere in your code, just include the class ArrFlatten in the use section and you're good to go.
Example
use Ashvedov\ArrayFlatten\ArrFlatten;
$test = new ArrFlatten(array: [[1, 2, [3, 5], [[4, 3], 4], 10], [1, 2, 3, 5, 4, 3, 4, 10]]);
var_dump($test->flattenArray());