How do i parse a text file with fields seperated by tabs?
Posted on 2004-10-12
Hi.. I've got a tab-delimited text file that came exported out of a mysql database.
I want to feed these fields into another database but I need a way to input the seperate fields into different fields.
Only way i can come up with is using perl or cgi to split the line into array variables, using the tabs as seperators.
However, I'm at somewhat of a loss as to how to do this.
(I know a little more perl then i do php sadly)
Any ideas on how to do this in php please?
I've used stuff like:
$explode = explode ('/', $entrydate);
to split the line up before but I've got no idea what the ascii code for a tab is?