PHP explode Function
The PHP explode function split the string into sub-string(or array).
SYNTAX
explode(separator,string,limit)
RETURN VALUE
Returns an array of strings
Example for PHP explode function
<?php
$str = “A quick brown fox jumps over the lazy dog”;
print_r (explode(” “,$str));
?>
PARAMETER
Name | Description | Required /Optional |
separator | The boundary string. | |
string | The input string. | |
limit | If limit is set and positive, the returned array will contain a maximum of limit elements with the last element containing the rest of string. If the limit parameter is negative, all components excep |