note 60486 deleted from function.implode by tularis
| From: | tularis@php.net | Date: | Wed, 18 Jan 2006 23:57:09 +0000 |
| Subject: | note 60486 deleted from function.implode by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-102068@lists.php.net to get a copy of this message | ||
Note Submitter: beckman at purplecow dot com
----
Implode seems to accept the glue and pieces as either parameter, at least in 5.0.5:
<?php
echo "PHP Version: ".phpversion()."\n";
$foo = array(1,3,5,7);
echo "Test Array: ";
var_dump($foo);
echo "Test 1: ".implode($foo, ',')."\n";
echo "Test 2: ".implode(',', $foo)."\n";
?>
Output:
PHP Version: 5.0.5
Test Array: array(4) {
[0]=>
int(1)
[1]=>
int(3)
[2]=>
int(5)
[3]=>
int(7)
}
Test 1: 1,3,5,7
Test 2: 1,3,5,7