<?php $string = 'Hëllo, peôple at Stackoverflow'; $array = ['hëllo', 'peôple']; $result = null; foreach ($array as $needle) { if (!preg_match('/\b' . preg_quote($needle, '/') . '\b/iu', $string)) { $result = false; break; } $result = true; } var_export($result);
You have javascript disabled. You will not be able to edit any code.