gammo Posted September 24, 2007 Share Posted September 24, 2007 I've been looking everywere for something like this for ages, and have never found anything that could do it. What I need is a simple script, that takes a list of names (Teams) and randomly pairs them off in groups of 2 or 4 or 6. I need it to run live so the 'Draws' can be schedulled and performed 'live'. So it would look like three colums on a page; _Left coloum, would have the list of team names that have entered a particular competition. Above that, a timer displaing the time left untill entries close. (Say 5 minutes before final draw time) _The middle coloum would have the count down timer untill the draw. _The right hand coloum would display the grouped sorting of the teams on the left. (After the draw time has expired) All these variables would need to be editable, except the actual results, of course. And would it be possible to kept a record of each draw? Is there a script out there that does this already? Is this very hard to do in php? I have very limited knowledge of php code, so should I be asking in the 'Freelance' area? Any help and suggestions most welcomed please. Quote Link to comment https://forums.phpfreaks.com/topic/70460-random-name-grouper/ Share on other sites More sharing options...
sasa Posted September 24, 2007 Share Posted September 24, 2007 try <?php $a = array(1,2,3,4,5,6); shuffle($a); $o = array_chunk($a, 2); print_r($o); ?> Quote Link to comment https://forums.phpfreaks.com/topic/70460-random-name-grouper/#findComment-354168 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.