$largest = [];
foreach ($this->keywords[$a] as $key => $arr) {
for ($c = 0; $c < count($this->keywords[$a]); $c++) {
$k = array_search($arr[0], $this->keywords[$a][$c]);
if ($k !== false && $c != $key) {
if (count($this->keywords[$a][$c]) > count($largest)) {
$largest = $this->keywords[$a][$c];
}
}
}
}
foreach ($this->keywords[$a] as $key => $arr) {
foreach($largest as $add_word){
if(!in_array($add_word, $arr)){
$this->keywords[$a][$key][] = '-'.$add_word;
}
}
}
<script>
var yaParams = 'ip: <? echo $_SERVER['REMOTE_ADDR']; ?>';
console.log(yaParams);
</script>