Answers for "search for substring in string php"

PHP
5

php find if substring is in string

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

if ($result != false)
{
  // text found
}
Posted by: Guest on March-13-2020
0

php find string in string

$pos = strpos("find the position of X in here", "X");
Posted by: Guest on March-16-2021

Code answers related to "search for substring in string php"

Browse Popular Code Answers by Language