Restructure 2d array so that column values become row values (transpose but preserve first level keys) – PHP
The situation is as follows. I have a parent array which looks like the following: $parent = [ 1 => ['test1', 'test2'], 2 => ['test1_1', 'test2_2'], ]; I would like to group the data by column. Desired result: [ 1…