你能帮我做一个时尚的文本生成器吗?

我想制作一个文本生成器,为我提供带有时尚字母之类的文本,鮩†ø而不是eRCTo. 我找到了这个:


/*

Code by ʍɨȼhą€ℓ

*/


$name = str_split('michael'); //Enter your name here

$letters = array("a"=>"ą", "b"=>"β", "c"=>"ȼ", "d"=>"ď", "e"=>"€", "f"=>"ƒ", "g"=>"ǥ", "h"=>"h", "i"=>"ɨ", "j"=>"j", "k"=>"Ќ", "l"=>"ℓ", "m"=>"ʍ", "n"=>"ɲ", "o"=>"๏", "p"=>"ρ", "q"=>"ǭ", "r"=>"я", "s"=>"$", "t"=>"ţ", "u"=>"µ", "v" => "ש","w"=>"ώ", "x"=>"ж", "y"=>"¥", "z"=>"ƶ");


$string = '';


$output = array(); 


foreach ($name as $key) { 

 if (array_key_exists($key, $letters)) { 

     $output[$key] = $letters[$key]; 


 } 

}


foreach ($output as $out) 

{

   $string .= "$out";

}  

echo $string;

它与 Michael 的名字一起使用,很棒!但如果我使用aaabbcdd它返回ąβȼď. 我也希望它返回重复的字母!我该做什么?


繁星coding
浏览 209回答 3
3回答

摇曳的蔷薇

在对最后一个代码进行了一些工作之后,我决定从第一个开始编写它……它比最后一个更好,并且可以更轻松地进行定制。您可以轻松改进它的代码并随意使用它??我只是填写我需要的字母。该$total变量会给你的结果。<?php$me = "mammad"; // Put Your Text Here.$a = array("Aͣ" , "@ͣ" , "ⓐͣ" , "Ⓐͣ" , "αͣ" , "ɐͣ" , "?ͣ" , "a̶ͣ" , "aͣ͟" , "aͣ" , "ᕕͣ" , "ᐲͣ" , "ᗅͣ" , "?ͣ" , "?ͣ" , "丹ͣ" , "คͣ" , "ᵃ" );$b = array("B" , "฿" , "ⓑ" , "Ⓑ" , "в" , "?" , "b̶" , "b͟" , "ᗾ" , "?" , "?" , "乃" , "๒" , "ᵇ" );$c = array("C" , "¢" , "℃" , "ⓒ" , "Ⓒ" , "ɔ" , "?" , "c̶" , "c͟" , "cͨ" , "ᑥ" , "?" , "?" , "?" , "匚" , "ς" , "ᶜ" );$d = array("Dͩ" , "ⓓͩ" , "Ⓓͩ" , "∂ͩ" , "dͩ" , "?ͩ" , "d̶ͩ" , "dͩ͟" , "ᴅͩ" , "dͩ" , "ᗟͩ" , "ᗥͩ" , "?ͩ" , "?ͩ" , "刀ͩ" , "๔ͩ" , "ᵈͩ" , "ᴰ" );$e = array("E" , "€" , "ᴱ" , "ξ" , "Ⓔ" , "Ǝ" , "?" , "E̶" , "E͟" , "ᓬ" , "?" , "?" , "ᴱ" , "ε" , "e" , "ⓔ" , "eͤ" , "ә" , "e̶" , "ᗴ" , "モ" , "ᵉ" );$f = array();$g = array();$h = array("H" , "ⓗ" , "Ⓗ" , "?" , "H̶" , "H͟" , "H_" , "?" , "?" , "ᴴ" , "н" , "ɥ" , "hͪ" , "h̶" , "h͟" , "hͪ" , "ђ" , "ʰ" );$i = array();$j = array();$k = array();$l = array();$m = array("Mͫ" , "ⓜͫ" , "Ⓜͫ" , "?ͫ" , "M̶ͫ" , "Mͫ͟" , "ᘻͫ" , "?ͫ" , "?ͫ" , "ᴹͫ" , "๓ͫ" , "ɯͫ" , "m̶ͫ" , "mͫ͟" , "ᴍͫ" , "mͫ" , "ᗰͫ" , "ᙏͫ" , "爪ͫ" , "ᵐ" );$n = array();$o = array();$p = array();$q = array();$r = array();$s = array();$t = array();$u = array();$v = array();$w = array();$x = array();$y = array();$z = array();$l = array("a"=> $a , "b"=> $b , "c"=> $c , "d"=> $d , "e"=> $e , "f"=> $f , "g"=> $g , "h"=> $h , "i"=> $i , "j"=> $j , "k"=> $k , "l"=> $l , "m"=> $m , "n"=> $n , "o"=> $o , "p"=> $p , "p"=> $q , "r"=> $r , "s"=> $s , "t"=> $t , "u"=> $u , "v"=> $v , "w"=> $w , "x"=> $x , "y"=> $y , "z"=> $z );$name = str_split($me);$string = '';$add = count($name);for ($a=0; $a < $add; $a++) {&nbsp; &nbsp; $key = $name[$a];&nbsp; &nbsp; $letter = $l[$key];&nbsp; &nbsp; $tedad = count($letter);&nbsp; &nbsp; $r = rand(0,$tedad);&nbsp; &nbsp; $string .= $letter[$r];}$matn = $string;$left = array(".o0×X","••.•´¯","׺°”˜","ıllıllı","▄▀▄▀","★·.·´¯");$right = array("X×0o.","¯`•.••","˜`”°º×","ıllıllı","▀▄▀▄","¯`·.·★");$rr = rand(0,5);$total = "$left[$rr]~$matn~$right[$rr]";echo $total;

海绵宝宝撒

修改这个:foreach&nbsp;($name&nbsp;as&nbsp;$key)&nbsp;{&nbsp;if&nbsp;(array_key_exists($key,&nbsp;$letters))&nbsp;{&nbsp;$output[$key]&nbsp;=&nbsp;$letters[$key];&nbsp;}&nbsp;}进入这个:foreach&nbsp;($name&nbsp;as&nbsp;$key&nbsp;=>&nbsp;$value)&nbsp;{&nbsp;if&nbsp;(array_key_exists($value,&nbsp;$letters))&nbsp;{&nbsp;$output[$key]&nbsp;=&nbsp;$letters[$value];&nbsp;}&nbsp;}因此,由于相同的数组键索引,结果数组不会被覆盖。
打开App,查看更多内容
随时随地看视频慕课网APP