title: PHP - Function echo not replace variable from a JSON object-string
body: <p>I would like to print the value of the variable '$fruit' directly with the php function echo.</p>
  <p>If i use a string this work properly, but if the string is previous retrieve by a JSON object php not sostitute the variable with his value.</p>
  <p>The above php code illustrate clearly the issue.</p>
  <pre><code>&lt;?php
  
  $json = '{
  
          &quot;object_1&quot;:
              {
                  &quot;0&quot;: &quot;banana&quot;,
                  &quot;1&quot;: &quot;$fruit&quot;
  
              }
              
          }';
              
  $fruit = &quot;mango&quot;;
  
  $object_json = json_decode($json, false);
  
  $var = $object_json-&gt;object_1-&gt;{1} ;
  
  echo &quot;$fruit &quot;; // result: mango
  
  echo $var; // result: $fruit, expected: mango
  
  ?&gt;
  </code></pre>
  <p>Thank a lot four your help!</p>