bij*_*jou 0 php algorithm brute-force
如何列出所有可能的组合:
字符串(4个字符,只有小写字母没有数字或特殊符号),#符号,字符串(5个字符,与第1个相同的rue).
例如:
dhgi#msodd
假设:英文字母
for($firstPart = 'aaaa'; $firstPart != 'aaaaa'; $firstPart++) {
for($secondPart = 'aaaaa'; $secondPart != 'aaaaaa'; $secondPart++) {
echo $firstPart,'#',$secondPart,'<br />';
}
}
Run Code Online (Sandbox Code Playgroud)
虽然你为什么要这样做,但我不知道.
这与您之前的问题有关吗?