check if text is in string php

PHP
if (strpos($string, 'substring') !== false) {
	// do stuff 
}$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: