title: Rename array index in PHP
body: <p>I want to explode a date but want to rename default index 0,1,2 to year, month, day respectively, I tried but I am not able to figure it out. Here's what am doing right now.</p>
  
  <pre><code>$explode_date = explode("-", "2012-09-28");
  echo $explode_date[0]; //Output is 2012
  echo $explode_date[1]; //Output is 09
  echo $explode_date[2]; //Output is 28
  </code></pre>
  
  <p>what I want</p>
  
  <pre><code>echo $explode_date['year']; //Output is 2012
  echo $explode_date['month']; //Output is 09
  echo $explode_date['day']; //Output is 28
  </code></pre>
  
  <p>Thanks..</p>