check if character exists in string 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';
}$mystring = 'abc';
$findme   = 'a';
$pos = strpos($mystring, $findme);$a = 'How are you?';

if (strpos($a, 'are') !== false) {
    echo 'true';
}
$haystack = 'This is my haystack that we shall check'
$has_A = strpos($haystack, 'A') !== false;
$has_a = strpos($haystack, 'a') !== false;

Source

Also in PHP: