The simple answer is... its wrong \:\) (although you were on the right path)

$i is one element/string of the $split array

Each time through the loop you are just over writing the string $i. Nothing is really changing.

If you look at my sample above, you will see I am overwriting the value in the array, and then once all the values are recreated, creating a string with the join.

Clear as mud?

_________________________
(... better days ahead)