title: How to sort a JSON array with PHP
body: <p>First of all i'm a complete newbie to this, i have searched for solutions but none seem to do the trick.</p>
  
  <p>So I am trying to sort this JSON array by date but i don't really know i should tackle this, any tips in the right direction are much appreciated!</p>
  
  <pre><code>["info":[
  {"id":1, "title":"original title", "name":"john doe", "date":"2010-05-15"}, 
  {"id":2, "title":"another title", "name":"foo bar", "date":"2009-04-11"},
  ...
  </code></pre>
  
  <p>So i'm getting the data like this</p>
  
  <pre><code>$data=file_get_contents('jsondata...');
  $d=json_decode($data,true);
  </code></pre>
  
  <p>I would like to sort the data by date, any ideas how i should approach this? Is it also possible to return the year value only? So the output would be 2009 instead of 2009-04-11?</p>
  
  <p>Thanks in advance</p>