array_slice in PHP

Syntax of array_slice array array_slice(array array, int offset[, int length][, bool keepkeys]) Returns an array containing a set of elements pulled from the given array. If offset is a positive number, elements starting from that index onward are used; if offset is a negative number, elements starting that many elements from the end of the … Read more

array_slice in php

To extract only a subset of the array, use the array_slice() function $subset = array_slice(array, offset, length); The array_slice() function returns a new array consisting of a consecutive series of values from the original array. The offset parameter identifies the initial element to copy (0 represents the first element in the array), and the length … Read more