PHP offers a function to show all tables in a specific database for a mysql database only.

I am currently working with PostgreSQL and I was wondering is there a similar function that will display every table in a database. (im looking for a php function, i dont want to use shell etc)