For example, I have this text:
<content>Foo</content>This is only a <b>test</b><content>Bar</content>Again, only a test.
How can I create an array with two entries, Foo and Bar?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your results will be put into the
$matchesarray.Access them with
$matches[0],$matches[1], and so on.Good luck!
EDIT:
preg_match_all()will give you all of the results! Thanks to @Blake for the tip.