In this kind of situation, I would rather use the mysql command-line utility to import the dump as a whole.
For instance, something like this should do :
mysql --user=YOUR_LOGIN --password=YOUR_PASSWORD --host=localhost YOUR_NEW_DATABASE_NAME < your_dump.sql
If you do not have command-line access to your server, maybe you can run this with exec / shell_exec / ...
If you really cannot use the mysql command from the command-line (nor using exec or any equivalent), maybe you can try using mysqli_multi_query ; as stated in the manual :
Executes one or multiple queries which
are concatenated by a semicolon.
Considering your dump prbably only contains several queries, separated by semi-colons, this might actually work...
Edit : as other people pointed out, what about reading the answers that have been given to your other questions ? For instance, there is some interesting stuff here : execute sql query from sql file
If there is something you don't understand in those answers, you can post comments to them, to, hoppefully, get more precisions.