Jump to content

Arrays In Text Files


Miles LLC

Recommended Posts

I have a folder of .txt files which have an array like this:

0#|#1#|#2#|#3#|#4#|#5#|#6

 

NOTE: All of the textfiles are md5 hashes.

 

Every text file has an array like this, (numbers representing the data) and i'm trying to make it so i can access every array an combine it. So in the end i want to know how many text files have the number "6" for the 6th array and so on.

 

I'm pretty new at PHP, so please be detailed.

Link to comment
https://forums.phpfreaks.com/topic/222685-arrays-in-text-files/
Share on other sites

I'm not sure exactly what you're trying to do, could you provide an example?

 

To retrieve contents from a file you can use - file_get_contents.

To merge the arrays you can use - array_merge.

To put each line into an array you can use explode.

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.