note 78863 deleted from function.implode by felipe
| From: | felipe@php.net | Date: | Sun, 16 Dec 2007 11:15:19 +0000 |
| Subject: | note 78863 deleted from function.implode by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133650@lists.php.net to get a copy of this message | ||
Note Submitter: anajilly
----
When implode() is passed an array with a single element or
with no elements, it does exactly what you would expect.
<?php
$a = array(); // passed an array with zero elements...
implode(';', $a); // implode returns an empty string: ''
$a[] = 'n'; // passed an array with one element
implode(';', $a); // returns the single element value with no $glue used: 'n'
?>