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.

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’ ]

]

  1. We don’t do assignments for people.
  2. Wherever you copy and pasted this from didn’t include all the information.
  3. Whoever assigned this probably covered the necessary information and expected you to make an attempt at solving it.

If you have some code that you have written that you need help with, post it, along with any symptom, error, or question you have with that code.

1 Like
Sponsor our Newsletter | Privacy Policy | Terms of Service