Mega Code Archive

 
Categories / Php / Functions
 

A recursive function is a function that calls itself from within its own code

<?php      function gcd($a, $b) {           return ($b > 0) ? gcd($b, $a % $b) : $a;      } ?>