Php Turn Array Into String Javascript Methods For Objects