title: how to print or echo JSON.stringify data i php
body: <p>i am trying to fetch google contact list using contact api. i got the result and its showing in chrome and firefox console. i want to print the data in php. on the same page</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
         function auth() {
           var config = {
             'client_id': 'xxxxxxxxxxxxxxxxxxxxx',
             'scope': 'https://www.google.com/m8/feeds'
           };
           gapi.auth.authorize(config, function() {
             fetch(gapi.auth.getToken());  
  
           });
         }
  
         function fetch(token) {
           $.ajax({
           url: "https://www.google.com/m8/feeds/contacts/default/full?access_token=" + token.access_token + "&amp;alt=json",
           dataType: "jsonp",
           success:function(data) {
  
               //alert(JSON.stringify(data));
                                    // display all your data in console
                      console.log(JSON.stringify(data));
  
           }
           });
       } 
      &lt;/script&gt;
  </code></pre>
  
  <p>i tried ajax but not worked. is there any best way to do it. <code>JSON.stringify(data)</code> is a array</p>