Created
June 6, 2013 09:23
-
-
Save zwacky/5720360 to your computer and use it in GitHub Desktop.
implode() an associative array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
implode(', ', array_map( | |
function ($k, $v) { return "{$k}: {$v}"; }, | |
array_keys($array), | |
array_values($array) | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment