title: Parse Directory Structure (Strings) to JSON using PHP
body: <p>I have an array of file-path strings like this</p>
  
  <ul>
  <li>videos/funny/jelloman.wmv</li>
  <li>videos/funny/bellydance.flv</li>
  <li>videos/abc.mp4 </li>
  <li>videos/june.mp4</li>
  <li>videos/cleaver.mp4</li>
  <li>audio/uptown.mp3</li>
  <li>audio/juicy.mp3</li>
  <li>fun.wmv </li>
  <li>jimmy.wmv</li>
  <li>herman.wmv</li>
  </ul>
  
  <p>End goal is to get them to jsTree. I built a prototype tree from the above sample strings.
  check it out: <a href="http://jsfiddle.net/ecropolis/pAqas/" rel="noreferrer">http://jsfiddle.net/ecropolis/pAqas/</a></p>