<?php
//VERSION 2010-01-12

function array_isearch($str, $array){
  $found = array();
  foreach ($array as $k => $v) {
      if(strstr(strtolower($v), strtolower($str))) $found[] = $k;
//      echo "$v like $str \n";
  }
  return $found;
}


function array_isearch_file($str, $array){
  $found = array();
  foreach ($array as $k => $v) {
//      if(strstr(strtolower($v), strtolower($str))) $found[] = $k;
	$matches="";
	preg_match(strtolower($str), strtolower($v), $matches);
 	if($matches) $found[]=$k;	
//      echo "$v like $str \n";
  }
  return $found;
}



?>
