Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $match_this = '/cola/';
- $sentence = 'cola this cola is a nice cola';
- if(preg_match_all($match_this, $sentence, $matches)){
- echo 'match found'.'<br>';
- print_r($matches[0]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement