How to pass a variable "$field" to a lambda-function?
function implode_assoc_array($array, $field)
{
// $ids = array_column($array, $field); PHP 5.5!
$ids = array_map(function($item) { return $item[$field]; }, $array);
return implode(', ', $ids);
}
implode_assoc_array($my_multidimensional_array, 'id');
Message: Undefined variable: field