implode associative array php code example
Example 1: php implode array
$values = array_map('array_pop', $array);
$imploded = implode(',', $values);
Example 2: php implode associative array
$users = [
'user1' => '[email protected]',
'user2' => '[email protected]'
];
echo implode(', ',$users);
// "[email protected], [email protected]"