Webbserverprogrammering 1

Show sourcecode

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

webbsrvprg/exercises/funktioner/

funktioner.php
funktioner1.php
funktioner2.php
funktioner3.php
funktioner4.php
funktioner5.php
funktioner6.php

funktioner4.php

31 lines UTF-8 Windows (CRLF)
<!DOCTYPE html>
<html>
<body>

<?php
function skriv($a, $b, $c, $order = "största") {
  
$print = $a;
  if (
$order == "minsta") {
    if (
$print > $b) {
      
$print = $b;
    }
    if (
$print > $c) {
      
$print = $c;
    }
  } else {
    if (
$print < $b) {
      
$print = $b;
    }
    if (
$print < $c) {
      
$print = $c;
    }
  }
  echo 
$print;
}

skriv(6, 3, 8, "minsta")
?> 

</body>
</html>