Split---&http://www.aliyun.com/zixun/aggregation/37954.html ">NBSP; To cut a string in a regular expression
Syntax: Array split (string pattern, string string [, int limit])
Description:
Returns an array of strings, using regular expression pattern as the boundary, and cutting string strings. If there is a set limit, the returned array will contain a maximum of limit elements, and the last element will contain the remaining portion of all strings. If an error occurs, split () returns FALSE.
The following examples can be obtained from the passwd line with five field data:
<?php
$passwd _list = Split (":", $passwd _line, 5);
?>
You can use a slash, a comma, or a hyphen to parse the date:
<?php
Date = "04/30/1973"; Delimiters may be slash, dot, or hyphen
List ($month, $day, $year) = Split (' [/.-] ', $date);
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.