return php array from certain index and on
What is a function to return an array containing only elements from a certain index on?
so I have an array $array = ('0', '1', '2', '3', '4')
I want to return an array that looks like ('2', '3', '4')
开发者_StackOverflow社区How do I do that using index 2?
Thanks in advance
You can use array_slice
:
$array = array('0', '1', '2', '3', '4');
print_r(array_slice($array,2));
Perhaps you would like to array_slice it?
精彩评论