Answers for "check value exist in string php"

PHP
6

php find if substring is in string

$result = strpos("haystack", "needle");

if ($result != false)
{
  // text found
}
Posted by: Guest on March-13-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 "check value exist in string php"

Browse Popular Code Answers by Language