Q:

Algorithm to determine all possibilities for names given an array [in PHP]?

Mismatch between code here & code in project caused problem.

A:

foreach ($words as $first) {
    foreach ($words as $second) {
        $taken[] = $first.$second;
    }
}

