title: Order include file depending on inherit
body: <p>Hi there people and greetings from Sweden!</p>
  
  <p>I have a really tricky problem here. I'll try to show exactly what I mean.</p>
  
  <p>I'm building a modulebased CMS, and some modules inherit from a parent module. My problem is that the parent modules need to be included before the "children".</p>
  
  <p>I fetch moduleinfo from a XML file and store it in an array like this:</p>
  
  <pre><code>Array
  (
      [bloggy] =&gt; Array
          (
              [module_id] =&gt; blog
              [module_name] =&gt; Blog
              [module_desc] =&gt; Description
              [module_url] =&gt; http://www.url.se
              [author] =&gt; Dev Name
              [author_url] =&gt; http://url.se
              [version] =&gt; 1.0
              [inherit] =&gt; core|twitter
              [path] =&gt; /path/to/file
              [dependon] =&gt; Array
                  (
                      [0] =&gt; core
                      [1] =&gt; twitter
                  )
          )
  </code></pre>
  
  <p>I've done a explode on inherit and saved it into "dependon" as you see above. The problem now is, how can I sort which order to include the files. Every module inherits from core but if there is another module in the depenon array then the "child" module must be included after.</p>
  
  <p>I hope you understand what I mean?</p>
  
  <p>// Tobias</p>