Page 1 of 1

unique value using table in php

Posted: Wed Jan 29, 2014 10:41 pm
by vijayalakshmi
If I select range the number 1 to 2 , the output will come in matrix format 2X2 as,
1st row =>1and2
2nd row =>2and1
(OR)
1st row =>2and1
2nd row =>1and2

If I select range the number 1 to 3 , the output will come in matrix format 3X3 as,
1 2 3,
2 3 1,
3 1 2
(OR)
2 1 3,
3 2 1,
1 3 2
whatever the output may come, But each cell value shouldn't come again in the same row and column.

If I select range the number 1 to 4 , the output will come in matrix 4X4 format as,

4 2 1 3,
1 4 3 2,
2 3 2 4,
3 1 4 1

I need to shuffle the range. I wish to clear this concept using php. Pls. anyone help.....

Re: unique value using table in php

Posted: Thu Jan 30, 2014 5:55 am
by Celauran
Not doing your homework for you. Show us what you've done already, where you got stuck, and we'll help if we can.