I have 3 strings, I would like to get only the equal strings of them, something like this:
$Var1 = \"Sant\"; $Array[] = \"Hello Santa Claus\"; // Name_1 $A
you can use strpos() function of php to identify if a string consist a substring or not as
strpos()
$a = 'Sant'; foreach($Array as $name) { if (strpos($name, $a) !== false) { echo $name; } }