array array_slice ( array $target_array, int $offset, [, int $length = NULL [, bool $preserve_keys = false]] );
array_slice, extracts a range of elements out of the target array based upon the parameters that you give it.
- The array from which to remove the range of elements.
- Specifies the element index (by the array pointer) where to start the slice If the offset is negative, it starts at the element from the end of the array; else the offset starts from index zero to where it is specified.
- optional Specify how many elements you want.
- optional When set to
TRUE, the array’s keys will be preserved; else, the keys will be reindexed and re-ordered.
Returns a new array with the range of elements you specified.
Your functions are bloated. Put them on a diet. Think "skinny" and "as few lines as possible."
More coming soon…keep checking back.