PHP字符串全排列
程序员文章站
2022-05-26 22:12:21
...
方法一:
$str = 'abc';
$a =str_split($str);
perm($a, 0, count($a)-1);
functionperm(&$ar, $k, $m) {if($k == $m){
echo join('',$ar), PHP_EOL;
}else {
for($i=$k; $i$m