- strstr: documentation ( source)
<?php
$owned_urls= array('website1.com', 'website2.com', 'website3.com');
$string = 'my domain name is website3.com';
foreach ($owned_urls as $url) {
if (strstr($url, $string)) {
echo "Match found";
return true;
}
}
echo "Not found!";
return false;