How can the PHP code be modified to display error messages instead of a blank page?

When encountering errors in PHP code, it is important to display error messages to identify and troubleshoot the issue. To display error messages instead of a blank page, you can enable error reporting in PHP by setting the `display_errors` directive to `On` in the php.ini file or by using the `ini_set('display_errors', 1);` function in your PHP script.

<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);

// Your PHP code goes here

?>