jwwtaker;10945434 wrote:this is documented by the source as having the delimiter being ord(1).
when I do a strpos on the string that fgets gets, it's not there.
I can't replace since it cant find it anymore after opening the file with PHP.
documented by the source as having ...
Why dont you give a link to the source of your script.
Instead of we have to make guessings and try to reconstruct it.
Thanks 🙂
To me it looks as a flatfile database concept.
- Where 'unit separator' (US) is 'A'
- and 'record separator' (RS) is 'B'
- The first 2 lines, starting with one '#'
tell:
- line1: table fields (columns) names: export_date, genre_id, parent_id, name
- line2: constraints, in this case set: primaryKey:genre_id
export_date is one UNIX TIMESTAMP [man]time[/man]
Following lines, without '#' are, records, rows in table
all separated with the record separator 'B' to mark end-of-row:
1267581199941 1 (null) Unknown^B
1267581199941 2 34 Blues^B
If the above is so, as I get it,
then it is not very difficult to [man]explode[/man] while testing for leading #
and using 'A' and 'B' for this explode
and so fetch all the data into one array.