= $wlen)){ $w2[$a] = $word{$a}.$word{$a+1}; } } ############## most common typos ############## // first dual letters.. while(list($key,$val)=each($dualletter)){ if(in_array($val, $w2)){ $arrval = array_search ($val, $w2); $typos[] = swap($arrval, $arrval+1, $word); } } // second double letters. while(list($key,$val)=each($doubleletter)){ if(in_array($val, $w2)){ $arrval = array_search ($val, $w2); $typos[] = condense($word, $arrval); } } ############## ############## ############### //now lets generate possible mechanical typos. silly fingers not finging.. while(list($key,$val)=each($w)){ $repls = $common[$val]; $d=0; for($a=0;$a=$depth){$a=100;} // breakout } } } return($typos); } ?>