title: PHP - unsetting variables in a loop by name
body: <p>Let's say I have some variables declared - but I don't know exactly which, I just have an array with variable names.</p>
  
  <pre><code>$variable_list = array('var1', 'var2', 'var3', 'var4');
  </code></pre>
  
  <p>We go ahead and assign some values.</p>
  
  <pre><code>foreach($variable_list as $var_name){
  $$var_name = rand(100,1000);
  }
  </code></pre>
  
  <p>Now I want to unset these variables in a similar fashion. Not remove them from list, but unset the ACTUAL variable.</p>
  
  <pre><code>foreach($variable_list as $var_name){
  unset($var_name);
  }
  </code></pre>
  
  <p>this does not work. any ideas?</p>