Pchp.Library.Arrays.array_chunk C# (CSharp) Method

array_chunk() public static method

Splits an array into chunks.
Chunks will contain deep copies of array items.
public static array_chunk ( PhpArray array, int size, bool preserveKeys = false ) : PhpArray
array Pchp.Core.PhpArray The array to be split.
size int The number of items in each chunk (except for the last one where can be lesser items).
preserveKeys bool Whether to preserve keys in chunks.
return Pchp.Core.PhpArray
        public static PhpArray array_chunk(PhpArray array, int size, bool preserveKeys = false)
        {
            return ChunkInternal(array, size, preserveKeys, true);
        }