I have a chunk of text like:
<b>First content</b> followed by <b>second content</b>
OR
"First content" and then "second content"
And I want to create an array that looks:
[1] => “First content”
[2] => “second content”
From either example, where I get the content between two tags. I’ve figured out how to get the first instances, but can’t figure out the best way to make it recursive.
If you know what exactly is between “First content” and “second content”, use
explode:http://php.net/manual/en/function.explode.php
e.g.
(use “strip_tags” on your array-elements if you just want the plaintext)