<?php $string = "Apple is a big tech company!"; $search = 'Apple Logo a'; $pattern = '/\b('.str_replace(' ', '|', preg_quote($search, '/')).')\b/i'; $arr = preg_match_all($pattern,$string,$matches); print_r($arr); print_r($matches);
You have javascript disabled. You will not be able to edit any code.