Answers for "text contain php"

PHP
3

php string contains

$string = 'The lazy fox jumped over the fence';

if (str_contains($string, 'lazy')) {
    echo "The string 'lazy' was found in the string\n";
}
Posted by: Guest on July-23-2021
8

string contains php

$a = 'How are you?';

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

Browse Popular Code Answers by Language