note 123363 added to function.implode
| From: | ASchmidt at Anamera dot net | Date: | Fri, 23 Nov 2018 21:43:46 +0000 |
| Subject: | note 123363 added to function.implode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-209761@lists.php.net to get a copy of this message | ||
It's not obvious from the samples, if/how associative arrays are handled. The
"implode" function acts on the array "values", disregarding any keys:
<?php
declare(strict_types=1);
$a = array( 'one','two','three' );
$b = array( '1st' => 'four', 'five', '3rd' =>
'six' );
echo implode( ',', $a ),'/', implode( ',', $b );
?>
outputs:
one,two,three/four,five,six
----
Server IP: 208.43.231.9
Probable Submitter: 74.102.115.131
----
Manual Page -- http://php.net/manual/en/function.implode.php
Edit -- https://master.php.net/note/edit/123363
Del: integrated -- https://master.php.net/note/delete/123363/integrated
Del: useless -- https://master.php.net/note/delete/123363/useless
Del: bad code -- https://master.php.net/note/delete/123363/bad+code
Del: spam -- https://master.php.net/note/delete/123363/spam
Del: non-english -- https://master.php.net/note/delete/123363/non-english
Del: in docs -- https://master.php.net/note/delete/123363/in+docs
Del: other reasons-- https://master.php.net/note/delete/123363
Reject -- https://master.php.net/note/reject/123363
Search -- https://master.php.net/manage/user-notes.php