I have the following two-dimensional array:
01 03 02 15
05 04 06 10
07 09 08 11
12 14 13 16
I want to convert columns to rows then reduce the matrix to a string like the following:
01,05,07,12|03,04,09,14|02,06,08,13|15,10,11,16
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m assuming that you have this array:
In which case, you can do this:
See it working