Postgres Loop Through Array Php Petani