note 14966 added to function.explode.php
| From: | php-general at lists dot php dot net | Date: | Wed, 22 Aug 2001 19:20:03 +0000 |
| Subject: | note 14966 added to function.explode.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16999@lists.php.net to get a copy of this message | ||
yes, like the perl func... If you want to split null spaces in a char into an array, go like this:
$str = 'string';
$chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY);
print_r($chars);
//this prints out Array([0]=>s[1]=>t[2]=>r[3]=>i[4]=>n[5]=>g);
http://www.php.net/manual/en/function.explode.php