manipulate strings using explode, implode and pop array functions