I have an array full of lines from a text file. I'm using preg_match to find the lines in this array that contain a certain string.
Each time I find a match I want to push the key value for that line to another array so I end up with an array full of keys where the matches occur. I then want to iterate through this new array and perform an action for each match.
How can I push just the keys to a new array?