php contain substring code example
Example 1: php find if substring is in string
$result = strpos("haystack", "needle");
if ($result != false)
{
// text found
}
Example 2: contains php
if (strpos($a, 'are') !== false) {
echo 'true';
}
$result = strpos("haystack", "needle");
if ($result != false)
{
// text found
}
if (strpos($a, 'are') !== false) {
echo 'true';
}