Php Turn Array Into String Python Replace Function Does Not Work