swapping spit with php