unique value using table in php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vijayalakshmi
Forum Newbie
Posts: 8
Joined: Tue Jan 21, 2014 10:22 pm

unique value using table in php

Post 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.....
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: unique value using table in php

Post 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.
Post Reply