【发布时间】:2017-04-28 14:59:10
【问题描述】:
我想做一些加密和写数字
我用过:
$a = [100,101,102,103,104,105]
function decrition (array $a){
return preg_replace('/101/','a',$a);
}
它会返回数组中每个 101 的所有字母“a”。 接下来我该如何改变? 101 到“b”,102 到“c”等等。
return preg_replace('[101|102|103|104|105]','a',$a);
此方法将所有这些数字替换为字母“a”
return preg_replace('[101|102|103|104|105','a|b|c|d|e',$a);
不幸的是,它不起作用
【问题讨论】:
-
I want to make some encryption请不要尝试和reinvent the wheel。