Answers for "php variable contains character"

PHP
6

php find if string contains

if (strpos($string, 'substring') !== false) {
	// do stuff 
}
Posted by: Guest on August-25-2020
1

php check if string contains a char

$haystack = 'This is my haystack that we shall check'
$has_A = strpos($haystack, 'A') !== false;
$has_a = strpos($haystack, 'a') !== false;
Posted by: Guest on August-04-2020

Code answers related to "php variable contains character"

Browse Popular Code Answers by Language