i want to make group distribution like the world cup 2010 for a tournament but according to the following criteria:
1- i have a classification for teams from 1 to n (n is the number of teams per groups)
2- number of groups = i
i want to distribute the teams to the groups randomly in php according to team classification
i.e: classification 1 will be the head of the groups.
so each group will contains random team according to the classification so that no teams will be with same classification at same groups
i want to make it dynamically so that the administrator will enter number of groups and number of teams and number of team per group will be number of teams / number of groups
please reply as soon as possible