Don't you want to put your entire content into an array and then check each line of that array for the content that you are looking for? It appears that you put all of the content into a string (or one element) then check that single element for your content. When you do that I would think that it would only return one hit. Change $content to an array and then search each line (foreach) for your content matches. That, I would think, will get you where you want to go. (I am assuming that the regex is correct.)
Paulster2
In reply to Re: Many matches to an array
by Paulster2
in thread Many matches to an array
by ciryon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |