title: PHP - How can I use curly bracket with variable correctly?
body: <p>I read php document and I saw this:</p>
  
  <pre><code>    class foo{
          var $bar = 'I am a bar';
      }
  
      $foo = new foo();
      $identity = 'bar';
  
      echo "{$foo-&gt;$identity}";
  </code></pre>
  
  <p>And I saw somebody wrote like this:</p>
  
  <pre><code>if (!isset($ns-&gt;job_{$this-&gt;id})){
     //do something
  }
  </code></pre>
  
  <p>But when I tried with this code, It didn't work:</p>
  
  <pre><code>$id1 = 10;
  
  $no = 1;
  
  echo ${id.$no};
  </code></pre>
  
  <p>Can you guys tell me why it didn't work and when I can use braces with variable correctly?</p>