Q:

Implement a groupByOwners function that: Accepts an associative array

function groupByOwners(array $files) : array
{
    $result = [];

    foreach($files as $file => $owner) {
        $result[$owner][] = $file;
    }

    return $result;
}
0

New to Communities?

Join the community