I am adding characters to a string of words and not quite getting the result I need.
I have a string like this: $string = "word word word word"
The output I need is: 'word'+'word'+'word'+'word'
What I am getting is: word+word+word+word+
Here is the function I am using:
$str = "word word word word";
$str = implode("+", explode(" ", $str))."+";
echo $str;
."+";??