mike42 Posted November 25, 2008 Share Posted November 25, 2008 hi guys How can i with preg_match multi div tags matching ex:<div> some text1</div><div>sometxt2</div><div>example</div>... thx Quote Link to comment Share on other sites More sharing options...
ddrudik Posted November 25, 2008 Share Posted November 25, 2008 Please show what matches you want from that string. Quote Link to comment Share on other sites More sharing options...
.josh Posted November 25, 2008 Share Posted November 25, 2008 preg_match_all("/<div[^>]*>(.*?)<\/div>/",$string,$matches); [pre] Array ( [0] => Array ( [0] => <div> some text1</div> [1] => <div>sometxt2</div> [2] => <div>example</div> ) [1] => Array ( [0] => some text1 [1] => sometxt2 [2] => example ) ) [pre] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.