Tango.info base20
Jump to navigation
Jump to search
function tif_num2consonants($number, $frombase=10 , $tobase=20){
$r=base_convert ($number, $frombase , $tobase );
$r=str_split($r);
//no vowel, no l
$rep=array(
0=>"b",1=>"c",2=>"d",3=>"f",4=>"g",
5=>"h",6=>"j",7=>"k",8=>"m",9=>"n",
"a"=>"p",
"b"=>"q",
"c"=>"r",
"d"=>"s",
"e"=>"t",
"f"=>"v",
"g"=>"w",
"h"=>"x",
"i"=>"y",
"j"=>"z"
);
$r_new=array();
foreach ($r as $k =>$v){
$v_new=$rep[$v];
$r_new[$k]=$v_new;
}
$r_new=implode($r_new);
//$tmp=array_flip($tmp);
return $r_new;
}