Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. $match_this = '/cola/';
  2. $sentence = 'cola this cola is a nice cola';
  3.  
  4. if(preg_match_all($match_this, $sentence, $matches)){
  5. echo 'match found'.'<br>';
  6. print_r($matches[0]);
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement