title: Why the code is not printing in Pretty Json format?
body: <p>Here is my code: </p>
  
  <pre><code>&lt;?php
  $result = dns_get_record("php.net",DNS_ANY);
  
  echo json_encode(array('data' =&gt; $result), JSON_PRETTY_PRINT);
  ?&gt;
  </code></pre>
  
  <p>I am trying to print the output into pretty json format, but do not understand why it is not printing pretty json.<br>
  Here is the output I get after every attempt: </p>
  
  <pre><code>{ "data": [ { "host": "php.net", "class": "IN", "ttl": 30, "type": "MX", "pri": 0, "target": "php-smtp2.php.net" }, { "host": "php.net", "class": "IN", "ttl": 300, "type": "TXT", "txt": "v=spf1 ip4:72.52.91.12 ip6:2a02:cb41::8 ip4:140.211.15.143 ?all", "entries": [ "v=spf1 ip4:72.52.91.12 ip6:2a02:cb41::8 ip4:140.211.15.143 ?all" ] }, { "host": "php.net", "class": "IN", "ttl": 300, "type": "SOA", "mname": "ns1.php.net", "rname": "admin.easydns.com", "serial": 1484930803, "refresh": 16384, "retry": 2048, "expire": 1048576, "minimum-ttl": 2560 }, { "host": "php.net", "class": "IN", "ttl": 300, "type": "AAAA", "ipv6": "2a02:cb41::7" }, { "host": "php.net", "class": "IN", "ttl": 49, "type": "A", "ip": "72.52.91.14" }, { "host": "php.net", "class": "IN", "ttl": 300, "type": "NS", "target": "dns3.easydns.org" }, { "host": "php.net", "class": "IN", "ttl": 300, "type": "NS", "target": "dns4.easydns.info" }, { "host": "php.net", "class": "IN", "ttl": 300, "type": "NS", "target": "dns2.easydns.net" }, { "host": "php.net", "class": "IN", "ttl": 300, "type": "NS", "target": "dns1.easydns.com" } ] }  
  </code></pre>
  
  <p>Kindly help me.</p>