split() in PHP
The split() function lets us break apart strings using regular expression to specify the matching string that will be used us the boundaries for that spliting.
Example :
$a = split(':', "one:two:three");
The preceding code returns an array with three strings in it namely one,two,three.
echo $a[0] => one
echo $[1] => two
echo $[2] => three
No comments:
Post a Comment