📜  php 从句子中创建单词对 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:53.824000             🧑  作者: Mango

代码示例1
/*this will get all word pairs next to eachother */
$sentence = "the cat sat down outside";
$sentenceArr = explode(" ",$sentence);
$wordPairs = array();
for($i=0;$i$word1){                                                
    for($j=($kw1+1);$j