Chapter 3: The Debugging Detective

By now, you've probably got a few hundred lines of code to sift through. You're on the hunt for that one pesky bug that's been evading you. Welcome to Chapter 3: The Debugging Detective.

Case 1: The Mysterious Case of the Missing Semi-Colons

You've got a program that's supposed to print out a list of numbers, but all it's printing is 'undefined'. Where could it be going wrong?

			<?php
			// Code goes here
			?>
		

Don't worry, we're not going to make you debug this mess. That's what Chapter 4 is for. But let's just take a gander at what's causing the problem:

So, here's the deal. We just need to replace the semi-colons with colons, and our program should be golden.

			<?php
			// New and improved code
			?>