Miles LLC Posted December 26, 2010 Share Posted December 26, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/222685-arrays-in-text-files/ Share on other sites More sharing options...
Maq Posted December 26, 2010 Share Posted December 26, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/222685-arrays-in-text-files/#findComment-1151609 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.