【发布时间】:2019-12-05 11:20:31
【问题描述】:
我需要从字符串中为搜索词创建一个多关系关键字数组。 例子: String is Like: Armitage Portable Wireless Powerbank with Suction
我需要一个类似的输出
1) Armitage
2) Portable
3) Wireless
4) Powerbank
5) Suction
6) Armitage Portable
7) Armitage Wireless
8) Armitage Powerbank
9) Armitage Suction
10) Portable Wireless
11) Portable Powerbank
12) Portable Suction
13) Wireless Powerbank
14) Wireless Suction
15) Powerbank Suction
16) Armitage Portable Wireless
17) Armitage Portable Powerbank
18) Armitage Portable Suction
等等……
【问题讨论】:
-
所以你想创建排列。请使用它作为(重新)搜索关键字,到目前为止,您不是第一个要求这样的人。
-
不,我需要在 PHP 中,我需要用单词而不是字符来分割。
-
谢谢我实现了这个逻辑,它工作正常。
标签: php arrays string search split