array preg_split ( string $pattern , string $subject [, int $limit = -1 [, int $flags = 0 ]] )
Split string by a regular expression
Split the given string by a regular expression.
<?php
$str = 'string';
$chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY);
print_r($chars);
?>
4.3.0 The PREG_SPLIT_OFFSET_CAPTURE was added 4.0.5 The PREG_SPLIT_DELIM_CAPTURE was added
Web Design and Programming Pt 9 Strings
0 Comment:
Post a Comment