PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ovunc Tukenmez  >  Combination Class  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example script (for all values)
Class: Combination Class
Generate combinations of an array of values
Author: By
Last change:
Date: 4 years ago
Size: 331 bytes
 

Contents

Class file image Download
<?php
require_once("CombinationClass.php");

$values = array("a", "b");

$combinations1 = new CombinationClass($values, false);
$combinations = $combinations1->getCombinations();
 
foreach (
$combinations as $comb)
{
    for (
$i=0; $i<count($comb); $i++)
    {
        echo
$comb[$i]." ";
    }
    echo
"<br>";
}
?>