title: Create new variables from array keys in PHP
body: <p>Suppose I have an array, like this:</p>
  
  <pre><code>$foo = array('first' =&gt;  '1st',
               'second' =&gt; '2nd',
               'third' =&gt;  '3rd');
  </code></pre>
  
  <p>How can I pick the keys out of the array and make them their own variables?
  For example, the array <code>$foo</code> would become:</p>
  
  <pre><code>$first = '1st';
  $second = '2nd';
  $third = '3rd';
  </code></pre>
  
  <p>I ask this because I am creating an MVC framework to help with my OOP, and I would like the user to pass a variable to the View loading function, which will allow the user to use variables in the template without having to know what the array was called.</p>
  
  <p>For example:</p>
  
  <pre><code>$array = array('title' =&gt;  'My blog!' [...]);
  $this-&gt;load-&gt;view('view.php', $array);
  </code></pre>
  
  <p>view.php:</p>
  
  <pre><code>echo $title;
  </code></pre>
  
  <p>Output:</p>
  
  <blockquote>
    <p>My blog!</p>
  </blockquote>