Copy one table data into another table is pretty simple using the MYSQL query. First of all, understand the thing because you want to select the data and insert into another MYSQL database table using PHP. It's not a big deal, you can modify query according to your need.
Use the below query to insert and select data.
INSERT INTO table2
SELECT * FROM table1 ;
The table is another table in which you want to insert the data from table one in PHP. The table1 specifies the table from which you want to select data and paste (insert) data into another table.
You can use Where clause with the select query.
INSERT INTO table2
SELECT * FROM table1 WHERE ;
WHERE clause helps to select the specific id-data or other. You can change according to your need.