Assuming the following array1(3x3)
Code: Select all
[color=#FF0000] 0 1 2[/color]
[color=#FF0040]0[/color] 0 0 1
[color=#FF0040]1 [/color]1 1 0
[color=#FF0040]2[/color] 0 1 1
I want to create single dimension array2, which will hold the index of the column that contains 1
[color=#FF0040][0][/color]=> 2
[color=#FF0040][1][/color]=> 0, 1 //No of cols, of array1, all in one cell with commas
[color=#FF0040][2][/color]=> 1, 2