fixing php syntax errors