Webbserverprogrammering 1

Show sourcecode

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

webbsrvprg/exercises/

InlämningsFormulär.php
include1.php
include2.php
includesid1.php
includesid2.php
includesid3.php
phpformulär1.php
phpformulär2.php
phpslump6.php
sidslut.php
sidstart.php
test.php
övning1.php
övning2.php
övning3.php
övning4.php
övning5.php
övningfunk1.php
övningfunk2.php
övningfunk3.php
övningfunk4.php
övningfunk5.php
övningfunk6.php
övningtest.php

övningfunk5.php

22 lines ASCII Windows (CRLF)
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <?php
    $tal 
= [5, 10, 15, 20, 25, 30, 35, 40, 45, 50];

    function 
medel($tal) {
    return 
array_sum($tal) / count($tal);
    }

   echo 
medel($tal);

 
?>


</body>
</html>