Location: PHPKode > scripts > Round Robin Class > round-robin-class/example_basic.php

// Provide opponents in an array format
$teams = array ('John Barnett', 
                'Phillip Carmichael', 
                'Daniel Carroll', 
                'Robert Craig', 
                'Thomas Griffin', 
                'John Hickey');

$roundrobin = new roundrobin($teams);

// Generating matches with matchdays
// The result is a 3-dimension array: matchday->match->opponents
if ($roundrobin->finished) {

echo "<br /><br />";

// Generating matches without matchdays
// The result is a 2-dimension array: match->opponents
if ($roundrobin->finished) {

// See 'example_full.php' for the other features
Return current item: Round Robin Class