Indentation is a bit odd here. Are you mixing tabs and spaces? Using a 4-space indent everywhere is probably best (it's the most common convention for PHP source).