how to remove last space in php