Jump to content

split strings (text between characters)


Stooney

Recommended Posts

im reading from a textfile, and building an array with the data.  ex of text file:
[code]
|AEther Flash|,|7th Edition|,|Red|,|Enchantment|,|2RR|,|n/a|,| Whenever a creature comes into play, AEther Flash deals 2 damage to it.|,|As the foul beast appeared, arcane lightning crackled around it.#172|,|Wayne England|,|Uncommon|,0,7130
[/code]
that is one of many thousand lines in the file.

what i need to do is take this and build an array with it.  each element of the array will contain the text in between the ||.  So in the above example, array element 0 would be 'Aether Flash', 1 would be 7th Edition, and so on.  thnx in advance for the help :D
Link to comment
https://forums.phpfreaks.com/topic/27924-split-strings-text-between-characters/
Share on other sites

Archived

This topic is now archived and is 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.