Webbserverprogrammering 1

Show sourcecode

The following files exists in this folder. Click to view.

webbserver/test/

funktion1.php
test4.php
test5.php
test6.php
test7.php

funktion1.php

17 lines ASCII Windows (CRLF)
<?php
    
function medel(array $array) {
        
$total 0;
        foreach (
$array as $varde) {
            
$total += $varde;
        }
        return 
$total count($array);
    }

    function 
skapaRandomArray($langd) {
        
$result = [];
        for (
$i 0$i $langd$i++) {
            
$result[] = rand(110);
        }
        return 
$result;
    }
?>