Array_slice---&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; Extract part of an array
Syntax: array array_slice (array array, int offset, int [length]);
Description:
This function returns a part of the element from the array, and if offset is a positive number, the retrieved part starts at the offset in the array, and the offset is negative, starting at the end of the array. If length is given and is positive, the length of the element will be retrieved, and if length is negative, the length of the element at the end of the array will be stopped, and if this argument is omitted, the returned portion will be from offset to the end of the array.
Example:
<?php
$input = Array ("A", "B", "C", "D", "E");
$output = Array_slice ($input, 2); Returns "C", "D", and "E"
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.