Isn't it better to do an `array_unique($orderedTables)` at the end of the loop instead of having to scan the array for each item? Or maybe even assign with `$orderedTables[$name] = $name` to avoid duplicates right from the beginning without even having to scan the array?