title: PHP: How to process File Names that Contain the # number sign?
body: <p>I'm working on a little Project to give some audio data a web interface.
  I'm reading the content of existing folders with PHP. </p>
  
  <p>Here's my PHP Code: </p>
  
  <pre><code>&lt;?php
  $mp3folder = 'mp3/';
  $oggfolder = 'ogg/';
  $mp3files = glob($mp3folder.'*.mp3');
  $oggfiles = glob($oggfolder.'*.ogg');
  echo '
  &lt;script type="text/javascript"&gt;
      $(document).ready(function(){
      new jPlayerPlaylist({
          jPlayer: "#jquery_jplayer_1",
          cssSelectorAncestor: "#jp_container_1"
      }, [';
  
  
  for ($i=0; $i&lt;count($mp3files); $i++) {
      $namerr[$i] = substr($oggfiles[$i],strlen($oggfolder),strpos($oggfiles[$i], '.')-strlen($oggfolder));
      echo '{'."\n";
      echo 'title:"'.$namerr[$i].'",'."\n";
      echo 'mp3:"'.$mp3files[$i].'",'."\n";
      echo 'ogg:"'.$oggfiles[$i].'"'."\n";
      echo '},'."\n";
  }
  echo '
      ], {
          swfPath: "../../_res/jplayer",
          supplied: "ogg, mp3",
          wmode: "window",
          smoothPlayBar: true,
          keyEnabled: true
      });
  });
  &lt;/script&gt;';
  
  ?&gt; 
  </code></pre>
  
  <p>I have directory structure built like this:</p>
  
  <pre><code>AUDIO
   -&gt; index.php
   -&gt; OGG
     -&gt; SONG#1.ogg
     -&gt; SONG#n.ogg
     -&gt; SONG FUN. ogg
   -&gt; MP3
     -&gt; SONG#1.mp3
     -&gt; SONG#n.mp3
     -&gt; SONG FUN.mp3
  </code></pre>
  
  <p>The php code above successfully reads the audio files and build a list out of it, so jPlayer can read them and show playlists out of it.<br>
  <strong>Problem is:</strong> jPlayer won't read the audio files, when the file name contains a "#" sign. 
  When I try to play "SONG #1.mp3" and then look at the debugger in Chromium it says "File SONG " not found, while it normally outputs something like "File 'SONG FUN.mp3' successfully read". </p>
  
  <p>So my conclusion is that PHP has some kind of problem reading file names that contain a "#".</p>
  
  <p>Or could jPlayer be the problem here?</p>
  
  <p>BTW: this is my first PHP Project, so please be indulgent if there are many mistakes. I'm sure there are different and much better ways to approach this. But I'm a learner. </p>
  
  <p>regards! </p>