Postgres Check Element In Array In Php