Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. $html = "<span><div class=apples> text </div> <div class=vip> text2 </div> <div class=vip> vip1 </div> <div class=food> textf </div> <div class=vip> vip14 </div><div class=vip> vip16 t</div> <div class=vip> text6 </div></span>";
  2.  
  3. preg_match("/<div class=vip>(.*?)</div></span>/is", $html, $matches);
  4. foreach($matches[1] as $divvip){
  5. echo $divvip;
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement