Get day names between two date in PHP
<p>How to get name of days between two dates in PHP?</p>

<p><strong>Input:</strong></p>

<blockquote>
  <p>Start Date:  01-01-2013<br>
   End date:    05-01-2013</p>
</blockquote>

<p><strong>Output:</strong></p>

<blockquote>
  <p>Tuesday<br>
     Wednesday<br>
     Thursday<br>
     Friday<br>
     Saturday  </p>
</blockquote>

<p><strong>Tried code</strong></p>

<pre><code>$from_date ='01-01-2013';
$to_date ='05-01-2013';

$number_of_days = count_days(strtotime($from_date),strtotime($to_date));

for($i = 1; $i&lt;=$number_of_days; $i++)
{
    $day = Date('l',mktime(0,0,0,date('m'),date('d')+$i,date('y')));
    echo "&lt;br&gt;".$day;       
}


function count_days( $a, $b )
{       
    $gd_a = getdate( $a );
    $gd_b = getdate( $b );

    $a_new = mktime( 12, 0, 0, $gd_a['mon'], $gd_a['mday'], $gd_a['year'] );
    $b_new = mktime( 12, 0, 0, $gd_b['mon'], $gd_b['mday'], $gd_b['year'] );

    return round( abs( $a_new - $b_new ) / 86400 );
}
</code></pre>

<p>I saw the post <a href="http://stackoverflow.com/questions/10015136/finding-date-of-particular-day-between-two-dates-php">Finding date of particular day between two dates PHP</a></p>

<p>But I don't got my result<br>
Please help me</p>
