I already have a function that finds the GCD of 2 numbers.
function getGCDBetween($a, $b)
{
while ($b != 0)
{
$m = $a % $b;
$a = $b;
$b = $m;
}
return $a;
}
But now, I would like to extend this function to find the GCD of N points. Any suggestion ?