TAAFT
Free mode
100% free
Freemium
Free Trial
Deals

BaseMax / PartitionArrayPHP

Partition an array into multiple arrays using PHP.

4 1 Language: PHP License: GPL-3.0 Updated: 1y ago

README

Array Partition PHP

Partition an array into multiple arrays using PHP.

Example

Input

$input=[1,2,3,4,5,6,7];
$size=[3,2,2];

Output

Array (
    [0] => Array (
            [0] => 1
            [1] => 2
            [2] => 3
        )
    [1] => Array (
            [0] => 4
            [1] => 5
        )
    [2] => Array (
            [0] => 6
            [1] => 7
        )
)
0 AIs selected
Clear selection
#
Name
Task