Updated and fixed php syntax