Tue Oct 28, 2008 1:41 pm
<html>
<head>
<title>Recursion</title>
</head>
<body>
<?php
function cnt_backwards($from) {
$from--;
if($from <= 1) {
print($from);
return;
}
print($from);
cnt_backwards($from);
}
cnt_backwards(5);
?>
</body>
</html>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.