0) { $max = $_POST['number']; } else { die('You entered an incorrect value'); } for($number = 1; $number <= $max; $number++) { $value = $number; $key = "$value"; $numbers[$key] = $value; } foreach($numbers as $key => $value) { $duration = "0"; $comb[$duration] = $numbers; } function oneup($numbers,$max) { $combinations = array(); foreach($numbers as $key => $value){ for($this = $value; $this < $max; $this++) { $start = $key; $ad = $this+1; $start .= "$ad"; $nom = "$start"; $combinations[$nom] = $ad; } } return $combinations; } for($duration = 1; $duration <= $max; $duration++) { $numbers = oneup($numbers,$max); $comb[$duration] = $numbers; } $counter = 0; print << Unique Numbers

Here is the unique numbers list.

HTML; $total = 0; foreach($comb as $key => $value){ $total += count($value); foreach($value as $keya => $valuea) { if($counter > 5) { $counter = 0; print << HTML; } echo ""; $counter++; } } print <<

Total Combinations: $total

HTML; } else { print <<Unique Numbers

Enter a number ranging from 1-10

HTML; } ?>
$keya