I had tried electrical tape but it just gets it sticky and stretches and doesn't work.
So I decided to wrap a little tape and then put on the spring on to hold it in place. It worked wonders and I am thrilled.
Take the spring out of a "clicker" pen And place it on the wire near the end of the spring.
Then twist it until it gets to the end so you can get the cut off end of the spring around the iPhone wire.
Once it's around it, twist until the spring is all the way on the the wire. It should slide back and forth on the wire now.
Slide the spring up and twist to sort of lock it on the wider part that connects the wire to the charger head. If your spring is too narrow to easily go over this bump, just stretch it a little to get the cut end started, then twist to get more of the spring to go on.
I've done it to five charger cords now (three to fix and two to protect and it gets easier each time).
Love a quick fix that fixes what you have instead of going to buy new. More money stays in my bank account :)