my MySQL query output is
dbcol_a | dbcol_b
dataA1 | dataB1
dataA1 | dataB2
dataA2 | dataB3
dataA2 | dataB4
dataA2 | dataB5
I wanna parse into struturized array like this:
arcol_a | arcol_b
dataA1 | dataB1
———-| dataB2
dataA2 | dataB3
———-| dataB4
———-| dataB5
thanks
This should do it:
This way you add each value in the second column to an array with an index of the first column.