title: Working with colons inside array keys, or how to avoid it
body: <p>I am being passed an array by an identity management system (SAML2.0 based) which provides me a set of user attributes in an array.</p>
  
  <p>The identity provider configures the structure of this data, and I am providing this (much larger company) with a service. Altering the way I receive this array is not in my control.</p>
  
  <p>The array arrives with me in this form (this is what I see if I <code>print_r</code> the array):</p>
  
  <pre><code>Array
  (
  [http://longurl/surname] =&gt; Array ([0] =&gt; Smith)
  [http://longurl/firstname] =&gt; Array ([0] =&gt; John)
  );
  </code></pre>
  
  <p>As you can see, the keys to this array of arrays is a URL (I'm sure they have a good reason?!). However if I try to work with this array like so:</p>
  
  <pre><code>echo 'Hello Mr. '.$SAMLDATA[http://longurl/surname][0];
  </code></pre>
  
  <p>This is no good, because colons aren't valid characters inside variables (or so I read).</p>
  
  <p>Escaping the character doesn't seem to work, any idea what I can do here? Many thanks.</p>