Show sourcecode
The following files exists in this folder. Click to view.
index.php
ovn_gr1.php
ovn_gr2.php
ovn_gr3.php
ovn_gr4.php
ovn_gr5.php
ovn_gr6.php
ovn_gr7.php
ovn_gr4.php
41 lines UTF-8 Windows (CRLF)
<?php
error_reporting(-1); // Report all type of errors
ini_set('display_errors', 1); // Display all errors
ini_set('output_buffering', 0); // Do not buffer outputs, write directly
?>
<!DOCTYPE html>
<html lang="sv">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Grunder</title>
</head>
<body>
<?php
function fromCtoF($c){
return(($c*9/5)+32);
}
$arrC = array();
$arrF = array();
for ($c = -20; $c <= 40; $c+=10){
$f = fromCtoF($c);
$arrC[] = $c;
$arrF[] = $f;
echo("$c grader C är $f grader F <br>");
}
var_dump($arrC);
echo("<br><br>");
var_dump($arrF);
echo("<br><br><br>");
print_r($arrC);
?>
</body>
</html>