Tango.info base20
Jump to navigation
Jump to search
consonants only, omitting "l"
function tif_num2consonants($number, $frombase=10 , $tobase=20){ //convert to base 20 $r=base_convert ($number, $frombase , $tobase ); //convert 0-j to b-z, no vowel, no l $char_0j_to_bz=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=str_split($r); $r_new=array(); foreach ($r as $k =>$v){ $v_new=$char_0j_to_bz[$v]; $r_new[$k]=$v_new; } $r_new=implode($r_new); //$tmp=array_flip($tmp); return $r_new; }