title: Use global to get a variable from parent function (function in function)
body: <p>I have function in function in PHP:</p>
  
  <pre><code>function myfunction() {
      $content = "somecontent";
      function secondfunction() {
         global $content;
         echo $content;
      }
      secondfunction();
  }
  </code></pre>
  
  <p><code>global</code> doesn't work. Why?</p>
  
  <p>Searched a lot but didn't find a solution.</p>
  
  <p>Thanks a lot!</p>