note 74657 added to function.explode

From: Date: Sun, 22 Apr 2007 15:30:15 +0000
Subject: note 74657 added to function.explode
Groups: php.notes 
Request: Send a blank email to php-notes+get-125765@lists.php.net to get a copy of this message
some more notes on the delimiter: if the delimiter is 0, explode will return an array with one element containig the hole string (same as if the delimiter was 1). if a negative delimiter is bigger or equal to the number of components, an empty array is returned. <?php print_r( explode( "|", "one|two|three|four", 0) ); print_r( explode( "|", "one|two|three|four", 1) ); ?> both print: Array ( [0] => one|two|tree|four ) <?php print_r( explode( "|", "one|two|three|four", -4) ); print_r( explode( "|", "one|two|three|four", -5) ); ?> both print: Array ( ) ---- Server IP: 69.147.83.197 Probable Submitter: 84.158.103.127 ---- Manual Page -- http://www.php.net/manual/en/function.explode.php Edit -- https://master.php.net/note/edit/74657 Del: integrated -- https://master.php.net/note/delete/74657/integrated Del: useless -- https://master.php.net/note/delete/74657/useless Del: bad code -- https://master.php.net/note/delete/74657/bad+code Del: spam -- https://master.php.net/note/delete/74657/spam Del: non-english -- https://master.php.net/note/delete/74657/non-english Del: in docs -- https://master.php.net/note/delete/74657/in+docs Del: other reasons-- https://master.php.net/note/delete/74657 Reject -- https://master.php.net/note/reject/74657 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#125765) next »