Phpexplode function description, phpexplode function _ PHP Tutorial

Source: Internet
Author: User
Tags php explode
Phpexplode function description: phpexplode function. Phpexplode function description, phpexplode function this article reposted address: www.manongjc.comarticle515.html phpexplode function uses one string to separate another string, after the split php explode function description, phpexplode function

Address: http://www.manongjc.com/article/515.html

The php explode function uses a string to separate another string. the split string is combined into an array and returns this array. This article introduces the basic syntax and examples of The explode function. For more information about coders, see.

Explode uses one string to separate another string

Basic syntax of the explode function:

array explode  ( string $delimiter  , string $string  [, int $limit  ] )

The explode function returns an array composed of strings. each element is a substring of a string, which is separated by a string delimiter as a boundary point.

Explode parameter introduction:

Parameter name Description
Delimiter Required. Delimiter.
String Required. The string to be split.
Limit

Optional. If the limit parameter is set and it is a positive number, the returned array contains up to limit elements, and the last element contains the rest of the string. If the limit parameter is negative, all elements except the last-limit element are returned. If the limit value is 0, it is regarded as 1.

Explode return value:

This function returns an array composed of strings. each element is a substring of a string, which is separated by a string delimiter as a boundary point.

If delimiter is a null string (""), explode () returns FALSE. If delimiter contains a value that cannot be found in string and uses a negative limit value, an empty array is returned. Otherwise, an array containing a single string element is returned.

Explode instance:

 

Online operation

Http://www.bkjia.com/PHPjc/1101863.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1101863.htmlTechArticlephp explode function explanation, phpexplode function this article repost address: http://www.manongjc.com/article/515.html php explode function uses a string to split another string, after the split...

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.