Task
Convert celcius to fahrenheit using PHP.
<?php
$cel = 16;
function convertToFahrenheit($value) {
$celsius = ($value * 9/5) + 32;
return $celsius;
}
?>
<!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>
<h1>Celcius: <?php echo $cel; ?>°C</h1>
<p>Converted: <?php echo convertToFahrenheit($cel); ?>°F</p>
</body>
</html>