This tends to depend very much on the database engine you're working on and if you have access to the command line tools for said database or not (i.e. are you running PHP in safe more or not).
If you're NOT running in safe more and you ARE running PostgreSQL, it's as easy as:
pg_dump dbname -t tablename|psql otherdbname
dump with a -s script to dump only the schema .
Something similar can be done with MySQL, but I'm not that familiar with the dump tools there.