This is the wiki page for the console command:
The toggle command can be used to switch the value of a cvar between 2 or more given values.
toggle cl_goalreplay_pov 0 1
To switch between different values of a number or string type cvar use
toggle sv_soccar_gravity -650 0.00001 650
This will switch in order between regular gravity, zero gravity, inverse gravity. If the value of sv_soccar_gravity is in neither of the 3 states, then it will be set to the first value.