/ Published in: PHP
Easy but powerful.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php function sum($from, $to){ if ($from == $to) { return $from; } return $to + sum($from,$to-1); } echo sum(8,100); ?>