I was trying to find a script to do round robin pairings for a sports
schedule generator..  I was able to come across one in Perl, and am in the
process of trying to convert it to PHP, but since my perl knowledge is a bit
(well, a lot) lacking, I was hoping someone could help..

Perl script:

http://www.perlmonks.org/index.pl?parent=90132&title=Round%20Robin%20Schedul
ing&lastnode_id=90132&displaytype=display&type=superdoc&node=Comment%20on


The part I'm having trouble with:

    for(1..($size-$even))
    {
    my @this_week;
    # push the weeks worth of games onto @games
    foreach my $sched_ref (@stripes)
    {
        push (@this_week, [$teams[$sched_ref->[0]], $teams[$sched_ref-
+>[1]]]);
    }
    push(@games, \@this_week);


I'm not sure how to rewrite that in PHP and be pushing the correct array
elements into the games array .. If anyone can help me out or point me in
the right direction, I'd appreciate it.

Thanks,
Chad


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to