title: How can I interpolate an existing php string literal inside a json file?
body: <p>I have a php script , it accessing a json file  by using <code>file_get_contents()</code>, inside a json file, we have declared a php variable. Please let me know is there any way to parse the php variable inside a json file.</p>
  
  <p>Below is the code:
  test.json</p>
  
  <pre><code>{
      "result":"$result",
      "count":3
  }
  </code></pre>
  
  <p>php script for accessing the json file</p>
  
  <pre><code>&lt;?php
  $result = 'Hello';
  $event = file_get_contents('test.json');
  echo $event;
  ?&gt;
  </code></pre>
  
  <p>Now the output is like below:</p>
  
  <pre><code>{ "result":"$result", "count":3 } 
  </code></pre>
  
  <p>But I need the output like this</p>
  
  <pre><code>{ "result":"Hello", "count":3 } 
  </code></pre>
  
  <p>I'm not able to access the <code>$result</code> variable inside a json file.
  Any help Appreciated.Thanks</p>