The array_slice() function returns selected parts of an array.
Syntax:array_slice(array,start,length,preserve)
In above syntax, "array" specifies an array, "start" specifies the numeric value where the function will start the slice, "length" specifies the length of the returned array and "preserve" specifies if the function should preserve or reset the keys and key values are as follows:
<?php
$a=array("Apple","Mango","Orange","Papaya","Banana");
print_r(array_slice($a,1));
?>
Output:
Others
Languages
Frameworks
Web / Design
Mobile Technology
Sql & Technology
R4R