Don't listen to all these php programmers who are frightened of sql, just use the tool tht is provided, which is LOAD DATA: it will import your file directly into your database table, and very fast as well. If you do any of the other solutions outlined here then your 25Mb is going to take you 25 mins to upload. LOAD DATA will import any type of txt file, you just specify the field delimiter etc. As to file size limit, that is server set by your host and will apply however you process it.
If you need to manipulate or transform your data in any way then import it into a temp table and then use a query to convert it into your permanent table. Messing around with arrays etc is just overkill and will take you twice as long to code.