how to write a function to output to loop through rows and columns to give this output. This should be achievable in 17 lines of code.
array [
1 => [ 0 => ‘XXX’, 1 => ‘Y’, 2 => ‘Y’, 3 => ‘Y’ ],
2 => [ 0 => ‘Y’, 1 => ‘XXX’ , 2 => ‘Y’, 3 => ‘Y’ ],
3 => [0 => ‘Y’, 1 => ‘Y’, 2 => ‘XXX’, 3 => ‘Y’],
4 => [ 0 => ‘Y’, 1 => ‘Y’, 2 => ‘Y’ , 3 => ‘XXX’ ]
]