Help me to understand piece of PHP code
<p>I'm trying to give default values to variables if there is no $_GET for them. There is 1 method with <code>if(isset(...))</code> but it's writing bunch of code for every variable. While researching for another solution found this piece of code. Can anyone help me to understand second line of code?</p>

<pre><code>$defaults = array('page' =&gt; 'main', 'lang' =&gt; 'en');
foreach ($defaults as $k =&gt; $v) $$k = isset($_GET[$k])? $_GET[$k] : $v;
</code></pre>
