Guest User

Untitled

a guest
Oct 21st, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. <?php
  2.  
  3. $sample = 'aaa <object>1</object> bbbb <object ccc></object> ddd eee fff <object></object>';
  4. preg_match_all('/(<object.+?<\/object>)/', $sample, $xxx);
  5. print_r($xxx);
  6.  
  7.  
  8. /*
  9.  
  10. REZULTAT:
  11. Array
  12. (
  13. [0] => Array
  14. (
  15. [0] => <object>1</object>
  16. [1] => <object ccc></object>
  17. [2] => <object></object>
  18. )
  19.  
  20. [1] => Array
  21. (
  22. [0] => <object>1</object>
  23. [1] => <object ccc></object>
  24. [2] => <object></object>
  25.  
  26. )
  27.  
  28. )
  29.  
  30.  
  31.  
  32. */
Add Comment
Please, Sign In to add comment