The only practical way to "fix" a broken string is to replace it. A new E string will probably cost a dollar at a music shop. Buy a spare while you're at it.
Having said that, and in the interest of honesty, when I was a kid in the 60's and had to rely on my parents to drive me places, I tied the occasional string back together. It's not always possible, and it will almost certainly stretch and break within a short time. It depends where it broke, and how much excess you have. If the string broke right at the ball end, you can re-tie it with greater success. It just takes some really tight twisting with vice-grips or pliers.
Another trick....if you have a Fender style headstock where the tuners are inline, the E string is the longest string. If the string broke right at the tuner, you *might* be able to switch it over to the next tuner. That will only work if there is enough excess on the B string to reach the E string tuner. Also, since since winding and unwinding strings increases the likelihood they'll break, you'll probably need to replace both strings when you do get to the store.
So there are your options. Do it right by replacing one string, or take your chances with trying to *temporarily* repair the broken string. I stress, it's only a 50% chance it will work, and it won't last longer than a couple of days if it does.
Playing guitar since 1964