Can you have one script talk to both databases? If so, you have one script pull out the records and port them over to the 2nd database. This is just an exercise in querying and inserting.
If you can't have one script access both databases, then you'll have to create two scripts. One script for each database. One script will be tasked with pulling data out of a database and the other script will be responsible for importing that data. The format can be whatever you choose. You'll be responsible for creating the format and then saving and reading data to that format.
Can PHP do this? Yup. It'll require some coding, but as long as it can talk to the databases, there's nothing stopping it...