Php Turn Array Into String Python Functions