Hello,
I am new to PHP language, but not to programming or Regular expressions. I am using
preg_match_all ($pattern, $file, $matches)
in my code, where $pattern contains two groups of capturing parentheses. I understand that each element of $matches[1] is an element captured by the first group of parentheses, and $matches[2] contains each element captured by the second group. My question is; I am trying to create an associative array in which each element of $matches[1] is keyed to it's corresponding $matches[2]. What is the best way to do this?
Thank you.