$longString = "I walk in the park.";
$stringArray = array("walk", "park", "beach");
Basically, I want to search $longString for all sub strings that are in the $stringArray. So in this case, I would like to find walk and park and then echo those strings.
Is this doable? Thanks guys!
Loop through the array and check if that string is present in the long string:
Demo