title: Use JSON in PHP
body: <p>I use some website that give me information about IP but the information that that website return in JSON and I don't know the JSON. I want to use this to check the user if it is from IR do something but I dont know how to use JSON in php,<br>
  Here is the JSON that the website return:</p>
  
  <pre><code>{"address":"0.0.0.0.0","country":"IR","stateprov":"somewhere ","city":"Tehr\somewhere (somewhere)"}
  </code></pre>
  
  <p>I want to save the country in a variable and add this code to my website:</p>
  
  <pre><code>&lt;?php
  if($country == 'IR'){
  //Do somethong  
  }
  </code></pre>
  
  <p><code>$country</code> is the country name that return from the website,</p>