I have date list. I want 01-04-2014
show as Jan 4
and 01-05-2014
show as Jan 5
. How do i do this? Here is my code:
$dates = array();
$timestamp = strtotime('-30 days');
for ($i = 0 ; $i <=30 ; $i++) {
//insert the date
$dates[$i]= date('m-d-Y', $timestamp);
//increase the day
$timestamp += 24 * 3600;
}
First i want to get dates then convert after for loop.