Answers for "php string exist in string"

PHP
2

php chech if string contains

$a = 'How are you?';

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

php if string contains

if (str_contains('How are you', 'are')) { 
    echo 'true';
}
Posted by: Guest on March-07-2022

Code answers related to "php string exist in string"

Browse Popular Code Answers by Language