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.
$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
what I want
echo $explode_date['year']; //Output is 2012
echo $explode_date['month']; //Output is 09
echo $explode_date['day']; //Output is 28
Thanks..