Answers for "php check if value exists string"

PHP
8

check if text exists in string php

$a = 'How are you?';

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

check exist string in string php

$myString = 'Hello Learn Tech Tips (Zidane)?';
if (strpos($myString, 'Zidane') !== false) {
    echo "This string contains Zidane";
}
Posted by: Guest on November-04-2021

Code answers related to "php check if value exists string"

Browse Popular Code Answers by Language