Così dovresti risolvere la ricerca senza successo e il case insensitive

Codice PHP:
function InterShow($string$from$to) {
if(
stripos($string$from)!== false &&stripos($string$to)!== false){
if(
strlen($from)>0)
        
$string substr($stringstripos($string$from));

if(
strlen($to)>0)
  
$string substr($string0stripos($string$to)+strlen($to));

  }
  else {
 
$string "La ricerca non ha dato esito positivo";
  }

 return 
$string;