What is the issue with the PHP code that causes only code to be displayed in the frontend?

The issue with the PHP code causing only code to be displayed in the frontend is likely due to the PHP opening and closing tags not being interpreted correctly by the server. To solve this issue, make sure that the PHP tags are properly formatted and that the server is configured to interpret PHP code.

<?php
// Correctly formatted PHP code
echo "Hello, World!";
?>