Show sourcecode
The following files exists in this folder. Click to view.
webbserverprogrammering/exercises/repetition/
ovning_1.php
ovning_2.php
ovning_3a.php
ovning_3b.php
ovning_3c.php
ovning_4.php
ovning_5.php
ovning_6.php
ovning_7.php
ovning_2.php
27 lines UTF-8 Windows (CRLF)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/dark.css">
<title>Övning 2</title>
</head>
<body>
<?php
function greatestValue($value1, $value2, $value3) {
$values = [$value1, $value2, $value3];
rsort($values);
return $values[0];
}
$x = greatestValue(44, 3, 929);
echo "Vi har värdena: 44, 3 och 929";
echo "<br>";
echo "Den största av dessa värden är: <strong>".$x."<strong>";
?>
</body>
</html>