title: PHP: Access the value of an object where the key contains a '$'
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2093169/how-do-i-access-a-php-object-attribute-having-a-dollar-sign">How do I access a PHP object attribute having a dollar sign?</a>  </p>
  </blockquote>
  
  
  
  <p>How do I access the value of an object where the key contains a '$'. I have an array named "entries" as follows:</p>
  
  <pre><code>Array
  (
      [0] =&gt; stdClass Object
          (
              [id] =&gt; stdClass Object
                  (
                      [$t] =&gt; xyz
                  )
          )
  )
  </code></pre>
  
  <p>I want to access the value of [$t], ie. xyz. The following command returns null:</p>
  
  <pre><code>echo $entries[0]-&gt;id-&gt;$t;
  </code></pre>
  
  <p>What syntax should I use?</p>