I have a mysql table say test and I want to create a importable .sql file for rows where id is between 10 and 100 using php script.
I want to create a sql file say t
As mentioned in the comments you can use mysqldump the following way.
mysqldump --user=... --password=... --host=... DB_NAME --where= > /path/to/output/file.sql
If you want this to be in your php file you can do the following
exec('mysqldump --user=... --password=... --host=... DB_NAME --where= > /path/to/output/file.sql');