Hello,
I try to get the contents of div tags from the text below :
<div>Text 1</div>
<div><b>Text 2</b></div>
I would like to get an array like :
$div [0] = "Text 1";
$div [1] = "<b>Text 2</b>";
I use preg_match_all with the following regexp :
"/<div>[<]+<\/div>/i"
The problem is that it stops when it finds a <, and I would like it to stops when it finds a "/div>".
I tried something like :
""/<div>[<\/div>]+<\/div>/i""
But it doesn't work.
How can I specify it to stop when it finds a string and not just a character ? "</div>" instead of "<".
Thanks,
JM