Answers for "php check if string contains /"

PHP
5

how to check if a string contains a substring in php

$a = 'How are you?';

if (strpos($a, 'are') !== false) {
    echo 'true';
}
Posted by: Guest on October-18-2020
6

php find if string contains

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

Code answers related to "php check if string contains /"

Browse Popular Code Answers by Language