PHP Percolate! Season 6 (19 Chapters)

Student: Jim Merrikin

script 8.1 - display_errors.php

OUTPUT:

Testing Display Errors


Warning: Invalid argument supplied for foreach() in /home/jmerriki/public_html/edu/percolate/chapter8/display_errors.php on line 20

Warning: Division by zero in /home/jmerriki/public_html/edu/percolate/chapter8/display_errors.php on line 21

CODE:

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>J. Merrikin - 8.1 Display Errors</title>
		<link rel="stylesheet" type="text/css" href="../common.css" />
	</head>
	<body>
		<!-- Script 8.1 - display_errors.php -->
		<?php
			include ("../header.php");
		?>
		<h2>Testing Display Errors</h2>
		<!-- PLACE OUTPUT CODE HERE -->
		<?php
			//show errors
			ini_set('display_errors',1);

			//create errors
			foreach ($var as $v) {}
			$result = 1/0;
		?>
	</body>
</html>