grab content
Moderator: General Moderators
-
playwright
- Forum Newbie
- Posts: 20
- Joined: Wed Jun 02, 2010 6:11 pm
grab content
Hello!! i want to grab all content that is between the tags <-- message --> and <!-- message -->.. I have found the right pattern to do so which is something like preg_match_all('%<!-- message -->(.+)<!-- / message -->%si',$x,$y) but it seems that it grabs all content from the 1st tag <-- message --> untill the last tag <!-- message --> in one record. However, there are many more such tags between the first and the last encounter and the thing is that i want to fill my array with all this records separately..Any ideas???
Re: grab content
Add a question mark:
Code: Select all
(.+?)