Код: Выделить всё
$files = array(
"Input.txt" => "Randy",
"Code.py" => "Stan",
"Output.txt" => "Randy"
);
Код: Выделить всё
[
"Randy" => ["Input.txt", "Output.txt"],
"Stan" => ["Code.py"]
]
Код: Выделить всё
Подробнее здесь: [url]https://stackoverflow.com/questions/53277290/flip-an-associative-array-and-prevent-losing-new-values-from-new-key-collisions[/url]