create a variable name from a string.. php
<p>Generally I pass an array of parameters to my functions.</p>

<pre><code>function do_something($parameters) {}
</code></pre>

<p>To access those parameters I have to use: <code>$parameters['param1']</code></p>

<p>What I would like to do, is run some sort of logic inside  this function on those parameters that converts that array into normal variables. My main reasons is just that sometimes I have to pass a whole load of parameters and having to type $parameters['..'] is a pain.</p>

<pre><code>foreach($parameters as $key=&gt;$paremeter) {
    "$key" = $parameter;
}
</code></pre>

<p>I thought that might work.. but no cigar!</p>
