That should read
<?php
function recursive ($n)
{
if ($n > 10)
{
return $n;
}
echo "N =" . $n . "<BR>";
$n++;
return recursive ($n);
}
echo "The result:".recursive(1)."<br>";
?>
With the important line being the :
return recursive ( $n );
This allows you to unwind the recursion correctly.
HTH
Rob