Jump to content

[nevermind] fread to array (only more complicated)


Stooney

Recommended Posts

below is some example lines of what i wish to use.  Basically I need to get all this information into an sql database.  I can handle that part easily, if i could just get the information from a textfile into an array.  That's generally easy, but it's hard to explain what im doing.

my closest idea is to fread the whole file, and just use explode(), but if i used a space as a delimiter, then the name and artists would be chopped apart.  Like in the example below, I would need 'academy ruins' in one variable (ex $cards[1]) therefore  a space cannot be the delimiter for explode().  i considered using tab, but it seems the manufacturer used spaces in the text file, not tabs.  Just curious if theres any other way to go about this.

ex.  (i put the array elements above the columns.

[code]
[0]                [1]                                                      [2]                                    [3]        [4]
269        Academy Ruins                            Zoltan Boros & Gabor Szikszai                Land        R
189        Æther Web                                Justin Sweet                                        Green        C
142        Ætherflame Wall                          Justin Sweet                                        Red          C
[/code]
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.