wow, alot more simple than i thought. guess its good that i'm taking a/s level maths in college!! (definately need a brush up on my maths)
anyway, i put together a selection of numbers with drawmacks code and it works fine.
the english lottery works like any other lottery, choses 7 numbers from a range of 1-49, however the 7th number is a "bonus" ball.
either way this is what i used in the end.
<?php
$ball = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,
42,43,44,45,46,47,48,49);
$range = max($ball) - min($ball);
$range++;
$balls = 7;
$total = $range;
for($i=1;$i<$balls;$i++)
$total = $total * ($range - $i);
echo 'There are ' . $total . ' combinations for this lottery.';
?>
thanks again!!
Jon