explode()


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

Description

explode() sends a user's message explode() returns an array of strings, each of which is a substring of string formed by splitting it on boundaries formed by the string delimiter PHPoC’s console or a log file(/mmap/log2). It is usually used for debugging.

※ available F/W version : all

Parameters

Return values

Returns an array of strings created by splitting the string parameter on boundaries formed by the delimiter, PHP error on error

Example

<?php
$ret = array();
$str = "abc,def,ghi,jkl,mno,pqr,stu,vwx,yz";
$delimeter = ",";

$ret = explode($delimeter, $str, 3);
echo $ret[0],"\r\n"; // OUTPUT: abc 
echo $ret[1],"\r\n"; // OUTPUT: def
echo $ret[2],"\r\n"; // OUTPUT: ghi,jkl,mno,pqr,stu,vwx,yz
?>

See also

None

Remarks

This function is identical to the PHP group’s explode() function, but it doesn’t support negative $limit.