Ok, so I am trying to detect whether a certain string is within another string, I have already tried using explode
but it didn't work for obvious reasons, just so you can possibly get a better idea of what I am trying to accomplish, take a look at my failed attempt at using explode
to try and solve my question
$stringExample1 = "hi, this is a example";
$stringExample2 = "hello again, hi, this is a example, hello again";
$expString = explode($stringExample1, $stringExample2);
if(isset($expString[1]))
{
//$stringExample1 is within $stringExample2 !!
}
else
{
//$stringExample1 is not within $stringExample2 :(
}
Any help will be appreciated thanks