<?php function urlHasString($url, $strings) { foreach($strings as $string) { if(strpos($url, $string)) { return true; } } return false; } $url = 'www.test.com#stuff'; $strings = ['#', 'java', 'jpg', 'jpeg', 'png', 'tel']; if(urlHasString($url, $strings)) { echo 'Yes it contains one of the strings'; } else { echo 'No it does not contain any of the strings'; }
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`