The database has the following lines:
A, A1, A2, A3 A, A4, A5, A6 A, A7, A8, A9 ... B, B1, B2, B3 B, B4, B5, B6 B, B7, B8, B9 ...
I need to get an output array:
[A => [[A1, A2, A3], [A4, A5, A6], ...], B => [[B1, B2, B3], [B4, B5, B6], ...] ]
Please tell me how to do it correctly.
select * from table
, then assembled with the function PDO :: fetchall, how here ru.stackoverflow.com/questions/504422/… - Mikeselect col1, col2 from table
and fetchall from that answer produced exactly the array you need. can you select extra columns in select - Mike