Use explode and implode functions to split string to array and join array to string.