Hi I want to get all the elements of an array after a particular point AND maintain the keys. How do I pass array_slice a null value for the third argument so that I can pass true for the fourth argument? I tried 'null'.
array_splice($array_name,3,null,true)
And/or is there a better way to do this?
Edit: To complete this question: Is there a way to pass a null value for the 3rd parameter. It seems like this is a weakness in this function if you can't pass a null value or 'placeholder'
Just pass the length of the array:
array_slice($array_name, 3, count($array_name)-3, true);
If you dont expect evil big array, you can set PHP_INT_MAX
array_slice($array_name, 3, PHP_INT_MAX, true);