Php Turn Array Into String Python Replace Function