check if astring is apart of another string in php

PHP
$a = 'Hello world?';

if (strpos($a, 'Hello') !== false) { //PAY ATTENTION TO !==, not !=
    echo 'true';
}
if (stripos($a, 'HELLO') !== false) { //Case insensitive
    echo 'true';
}$result = strpos("haystack", "needle");

if ($result != false)
{
  // text found
}
Source

Also in PHP: