Guest User

Untitled

a guest
Jul 20th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. $text1 = array ('you', 'hello', 'WORLD');
  2. $text2 = "Hello world";
  3.  
  4. //preg_match
  5. foreach ($text1 as $text) {
  6.  
  7. if (preg_match_all("~b$textb~i", $text2, $match)) {
  8.  
  9. $match = $match[0];
  10.  
  11.  
  12. echo "<pre>";
  13. print_r($match);
  14. echo "</pre>";
  15.  
  16. }
  17. }
Add Comment
Please, Sign In to add comment