1
2
6
24
120
720
5040
40320
362880
3628800
39916800

Code:

<html>
<head>
<title>PHP TEST YAHHH</title>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body>

<div class="topbar">
<?php
include 'navbar.php';
?>

</div>

<?php

    
    //factorial

    for ($i = 1; $i < 12; $i++)
    {
        $fact = $i;
        $helper = $i - 1;
        
        for ($n = $helper; $n > 0; $n--)
        {
            $fact *= $n;    
        }

        echo $fact;
        echo '<br>';
    }
    

    //echo '<br>';
        
    
?>

<div class="codebox">
<h3>Code:</h3>
<?php
highlight_file("ex028.php");
?>
</div>

</body>
</html>