Yes! I've just gotten over a toe injury (it sounds lame, but I injured my big toe an couldn't run, which was my main exercise!).
I've been out for a month.. I was running 4k a day and now struggle with 1k, so it feels like starting over
. I would strongly recommend that you don't stop exercise altogether (don't get a flat tyre and then get out and slash the other three)! Take a couple of days' rest, use the RICE method, then get back to the gym.
DON'T put pressure on your foot: swimming and cycling are your friends. Also, the stepper might not be too bad depending on how painful the injury is, or those weird arm-cycle machines, or boxing if you don't move your feet too much.
So yeah, my main advice is to keep doing something, even if you just swim every day, otherwise you might lose momentum like I did... and it's really hard to get it back!
Good luck - hope it heals soon!