title: Cannot access PHP array with slashes in key
body: <p>I have an array that looks like this:
  <img src="https://i.stack.imgur.com/wpykX.png" alt="items array"></p>
  
  <p>For the life of me, I cannot access the array by key, for example, this does not work:</p>
  
  <pre><code>// $js is a string with value "lib/jquery/jquery-1.10.2.min.js"        
  $key = "js/$js";
  if (isset($items[$key]))
      $item = $items[$key];
  </code></pre>
  
  <p>This always returns false unless I specifically type in the key such as:</p>
  
  <pre><code>$item = $items["js/lib/jquery/jquery-1.10.2.min.js"];
  </code></pre>
  
  <p>Some times I just don't get PHP.</p>
  
  <p>EDIT:
  I dumped out the variables:</p>
  
  <pre><code>string 'lib/jquery/jquery-1.10.2.min.js' (length=32)
  string 'js/lib/jquery/jquery-1.10.2.min.js' (length=35)
  </code></pre>