Php Insert Into Array Javascript Methods Syntax Error