How can PHP be used to export and import MySQL tables?

To export and import MySQL tables using PHP, you can use the `mysqldump` command to export the tables to a SQL file, and then use the `mysql` command to import the SQL file back into the database. You can execute these commands in PHP using the `exec()` function.

// Export MySQL tables
exec('mysqldump -u username -p password database_name table_name > export_file.sql');

// Import MySQL tables
exec('mysql -u username -p password database_name < import_file.sql');