Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $date1 = '2014-09-19';
- $date2 = '2014-10-19'; $i = 1;
- echo '<table>';
- while(strtotime($date1) <= strtotime($date2)){
- if(date('w', strtotime($date1))==0){
- echo '<tr style="background-color: red">';
- } else{ echo '<tr>';
- }
- echo '<td>'.$i.'</td>'. '<td>'.date('l',strtotime($date1)).'</td>'. '<td>'.$date1.'</td>'. '</tr>';
- $date1 = date('Y-m-d',strtotime($date1.'+1 days')); $i++;
- } echo '</table>'; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement