Php Insert Into Array Javascript Function Definition Is Not Allowed