This function has been deprecated as of PHP 5.3.0.
Makes an array of a string.
This function is similar to explode(), but uses regular expressions instead of just strings for the separator. The string is split where there is a match for the separator, and the portions of the string between the matches are returned as elements of an array. If the n parameter is provided, a maximum of n elements will be returned in the array.
<pre>
<?php
$s = "123a456x789";
$pattern = "[a-z]";
$a = split($pattern, $s);
print_r($a);
?>
</pre>
Array
(
[0] => 123
[1] => 456
[2] => 789
)
The string is split at each occurrence of a letter.