접두어 배열, 기본 단어 배열 및 접미어 배열이 있습니다. 내가 할 수있는 모든 조합을보고 싶습니다.순열/조합 접두어와 접미사 생성
예 :
prefixes: 1 2
words: hello test
suffixes: _x _y
Results:
1hello_x
1hello_y
1hello
1test_x
1test_y
1test
1_x
1_y
1
2hello_x
2hello_y
2hello
2test_x
2test_y
2test
2_x
2_y
2
hello_x
hello_y
hello
test_x
test_y
test
_x
_y
y
내가 어떻게 할 수 있습니까?
편집 : 모든 응답 주셔서 감사합니다. 해결책을 찾아 보겠습니다.하지만 접두사가없는 경우 조합이 실패합니다. 접두사가 없어도 기본 단어와 접미사를 계속 따라 가야합니다.
편집을 참조하십시오. – ParoX
'array_push ($ prefixes, ");'..''array_push ($ words,");''array_push ($ prefixes, ");'를 추가하면 필요한 것을 할 수 있습니다. 또한주의 할 점은 매개 변수에 $ 접미사가 붙고 접미사가 – ParoX
일 뿐이라는 점입니다. '전체'질문을 여러 번 바꾸지 말고 첫 번째 장소에 게시하십시오. –