Fri Nov 27 10:00:01 EST 2009 974 12506 Fri Nov 27 11:00:01 EST 2009 988 12655 Fri Nov 27 12:00:01 EST 2009 1005 12886 Fri Nov 27 13:00:01 EST 2009 1026 13115 Fri Nov 27 14:00:01 EST 2009 1042 13429
I tried to explode on \n and then \t, but it looks like there are no tabs in the file...
It appears to be fixed column width. You're going to need to either:
Explode will likely return a bunch of empty elements, since it only matches a single character / one space.
This'll split at all whitespace collections, regardless of size.
If possible PHP treats all incoming vars as an integer first of all, so if the text files are of predictable length ( 24, 12, 12 Chars that I can see) then 0000000974 will be correctly parsed as being the integer 974 without having to resort to trim.
Isn't it alway best to aviod regexes if you can?
the rest is up to you