How to unset multiple variables?

Yousuf Memon picture Yousuf Memon · Sep 28, 2012 · Viewed 37.5k times · Source

Possible Duplicate:
Can you unset() many variables at once in PHP?

I have 3 variables var1 var2 var3. Is there's a way of un-setting them without repeated use of unset() function ?

Answer

webCoder picture webCoder · Sep 28, 2012

try this

unset($foo1, $foo2, $foo3);