PHP code to convert Fahrenheit to Celsius

<?php
  $fahrenheit = 72; // Change this value to the Fahrenheit temperature you want to convert
  $celsius = ($fahrenheit - 32) * (5/9);
  echo $fahrenheit."°F is equivalent to ".$celsius."°C";
?>

In the above code, we first assign the Fahrenheit temperature to the variable $fahrenheit. We then apply the formula (F - 32) * (5/9) to convert Fahrenheit to Celsius and store the result in the variable $celsius. Finally, we print the result using the echo statement.

You can replace the value 72 in the code with any other Fahrenheit temperature you want to convert, and the code will calculate and display the equivalent Celsius temperature.

Related Articles

- All From ChatGPT
PLG_GSPEECH_SPEECH_BLOCK_TITLE