title: Printing JSON object using PHP
body: <p>I have a JSON file and I would like to print that object in JSON:</p>
  
  <p><strong>JSON</strong></p>
  
  <pre><code>[{"text": "Aachen, Germany - Aachen/Merzbruck (AAH)"}, {"text": "Aachen, Germany - Railway (ZIU)"}, {"text": "Aalborg, Denmark - Aalborg (AAL)"}, {"text": "Aalesund, Norway - Vigra (AES)"}, {"text": "Aarhus, Denmark - Aarhus Airport (AAR)"}, {"text": "Aarhus Limo, Denmark - Aarhus Limo (ZBU)"}, {"text": "Aasiaat, Greenland - Aasiaat (JEG)"}, {"text": "Abadan, Iran - Abadan (ABD)"}]
  </code></pre>
  
  <p>I have tried with following method,</p>
  
  <pre><code>&lt;?php   
    $jsonurl='http://website.com/international.json'; 
    $json = file_get_contents($jsonurl,0,null,null);  
    $json_output = json_decode($json);        
    foreach ($json_output as $trend)  
    {         
     echo "{$trend-&gt;text}\n";     
    } 
  ?&gt;
  </code></pre>
  
  <p>but it didn't work:</p>
  
  <blockquote>
    <p>Fatal error: Call to undefined function var_dup() in /home/dddd.com/public_html/exp.php on line 5 </p>
  </blockquote>
  
  <p>Can anyone help me understand what I'm doing wrong?</p>