Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.