为了账号安全,请及时绑定邮箱和手机立即绑定

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

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

PHP
繁星coding 2021-06-14 16:22:17
我想制作一个文本生成器,为我提供带有时尚字母之类的文本,鮩†ø而不是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它返回ąβȼď. 我也希望它返回重复的字母!我该做什么?
查看完整描述

3 回答

?
摇曳的蔷薇

TA贡献1793条经验 获得超6个赞

在对最后一个代码进行了一些工作之后,我决定从第一个开始编写它……它比最后一个更好,并且可以更轻松地进行定制。您可以轻松改进它的代码并随意使用它??我只是填写我需要的字母。该$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++) {

    $key = $name[$a];

    $letter = $l[$key];

    $tedad = count($letter);

    $r = rand(0,$tedad);

    $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;



查看完整回答
反对 回复 2021-06-19
?
海绵宝宝撒

TA贡献1809条经验 获得超8个赞

修改这个:

foreach ($name as $key) { if (array_key_exists($key, $letters)) { $output[$key] = $letters[$key]; } }

进入这个:

foreach ($name as $key => $value) { if (array_key_exists($value, $letters)) { $output[$key] = $letters[$value]; } }

因此,由于相同的数组键索引,结果数组不会被覆盖。


查看完整回答
反对 回复 2021-06-19
  • 3 回答
  • 0 关注
  • 208 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信