title: How do I join specfic json data into one txt file
body: <pre><code>&lt;?php
  $weatherdata = file_get_contents('http://api.openweathermap.org/data/2.5/weather?id=appkey');
  
  file_put_contents('weatherdata.json', $weatherdata);
  $decoded = json_decode($weatherdata);
  file_put_contents('weatherdata_alert.txt', $decoded-&gt;weather[0]-&gt;description);
  ?&gt;
  </code></pre>
  <p>I can get the description from json data into a text entitled &quot;weatherdata_alert.txt&quot; but cannot seem to include other data from the string..
  This is the desired result &quot;clear sky 2° Millbrook&quot;
  description being &quot;clear sky&quot;</p>
  <p>This is the json data</p>
  <pre><code>{
      &quot;coord&quot;: {
          &quot;lon&quot;: -78.45,
          &quot;lat&quot;: 44.15
      },
      &quot;weather&quot;: [{
          &quot;id&quot;: 804,
          &quot;main&quot;: &quot;Clouds&quot;,
          &quot;description&quot;: &quot;overcast clouds&quot;,
          &quot;icon&quot;: &quot;04n&quot;
      }],
      &quot;base&quot;: &quot;stations&quot;,
      &quot;main&quot;: {
          &quot;temp&quot;: 272.97,
          &quot;feels_like&quot;: 269.29,
          &quot;temp_min&quot;: 272.04,
          &quot;temp_max&quot;: 274.15,
          &quot;pressure&quot;: 1021,
          &quot;humidity&quot;: 69
      },
      &quot;visibility&quot;: 10000,
      &quot;wind&quot;: {
          &quot;speed&quot;: 1.5,
          &quot;deg&quot;: 130
      },
      &quot;clouds&quot;: {
          &quot;all&quot;: 90
      },
      &quot;dt&quot;: 1604459237,
      &quot;sys&quot;: {
          &quot;type&quot;: 1,
          &quot;id&quot;: 882,
          &quot;country&quot;: &quot;CA&quot;,
          &quot;sunrise&quot;: 1604404430,
          &quot;sunset&quot;: 1604440849
      },
      &quot;timezone&quot;: -18000,
      &quot;id&quot;: 7804010,
      &quot;name&quot;: &quot;Millbrook&quot;,
      &quot;cod&quot;: 200
  }
  </code></pre>