[thelist] recursive PHP functions

Roger Ly rogerly at bareviking.com
Mon Sep 16 10:52:01 CDT 2002

function recursive ($n)
    if ($n > 10) return $n;
        recursive ($n);
echo "The result:".rec1(1)."<br>";

You need to change the last line in the function recursize to

return recursive ($n);

The function isn't actually returning anything in the first case.


More information about the thelist mailing list