What could be the potential reasons for PHP code being displayed as text in the browser instead of being executed?

The potential reasons for PHP code being displayed as text in the browser instead of being executed could be that the PHP module is not installed or enabled on the server, the file extension is incorrect (e.g., using .html instead of .php), or there is a syntax error in the PHP code. To solve this issue, ensure that PHP is properly installed and enabled on the server, use the correct file extension (.php), and check for any syntax errors in the PHP code.

<?php
// Correct file extension and PHP opening tag
echo "Hello, World!";
?>