Php recursion to get all possibilities of strings

后端 未结 6 1856
失恋的感觉
失恋的感觉 2020-11-27 07:22

Here is my code to get all possibilities:

$seq[1] = \'d\';
$seq[2] = \'f\';
$seq[3] = \'w\';
$seq[4] = \'s\';

for($i = 1; $i < 5; $i++)
{
    $s[\'length         


        
6条回答
  •  清歌不尽
    2020-11-27 08:06

    This is a standard permutation question, look in to "php permutations" if you need all variations of the string.

提交回复
热议问题