check if something is on a string php

PHP
$result = strpos("haystack", "needle");

if ($result != false)
{
  // text found
}// returns true if $needle is a substring of $haystack
function contains($haystack, $needle){
    return strpos($haystack, $needle) !== false;
}
Source

Also in PHP: