I'm trying something like
$a=array("aaa","bbb","cccc","dddd");
$b=array();
foreach($a as $k=>$v){
$n=sizeof($a);
for($i=($k+1);$i<=$n;$i++) $b[]=$a[$k].$a[$i];
}
var_dump($b);
And I would like to have all kinds of glued strings in $b
regardless of the array length of $a
. I've tried different for loops which served partial solutions, maybe I'm not seeing the forest for the trees?
If I closer I'll post the upgraded code. Thanks for helping.