|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-06-25 19:59 UTC] sjoerd-php at linuxonly dot nl
[2009-06-26 23:15 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 17:00:01 2025 UTC |
Description: ------------ if the string have a space in the begin of the string, takes the space as a word. Reproduce code: --------------- --- From manual page: function.explode --- <? phpinfo(); $a = " word1 word2"; $b = explode(" ",$a); print_r($b); print "<br>".count($b); /* result: Array ( [0] => [1] => word1 [2] => word2 ) 3 */ ?> Expected result: ---------------- Array ( [0]=>word1 [1]=>word2 ) Actual result: -------------- Array ( [0] => [1] => word1 [2] => word2 )