how to get list of date and name of day between two dates using php

<?php
$start=date('2013-05-02');
$end=date('2013-05-06');
?>

I got out put like following,I don't know how to get this please help me

Thursday 2013-05-02 Friday 2013-05-03 Saturday 2013-05-04 Sunday 2013-05-05 Monday 2013-05-06

Answers


$start    = new DateTime('2013-5-02');
$end      = new DateTime('2013-6-02');
$interval = DateInterval::createFromDateString('1 day');
$period   = new DatePeriod($start, $interval, $end);

foreach ($period as $dt)
{
    echo $dt->format("l Y-m-d");
    echo "<br>";
}

Note[it's support only Above 5.3.0 php version]


Need Your Help

Silverlight Control with Measure / Desired Size issue with Image stretching from middle usercontrol

c# silverlight xaml layout custom-controls

I've got a Custom Control I'm working on and got it to work fine on it's own, however when it is grids where the width is being set I'm getting errors such as:

Avoid multiple function member call on an instance in C++

c++ logging static-assert

I wrote a logger class for my program but I want to force the client to use my class in a specific way. Here is my Logger class:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.