I want to generate a week array with day, month, year and day to string like:
Monday | 12-05-2014
Tuesday | 13-05-2014
Wednesday | 14-05-2014
Thursday | 15-05-2014
Friday | 16-05-2014
Saturday | 17-05-2014
Sunday | 18-05-2014
I want as week to start from Monday like the format from top.
I tried this but week does not start from Monday.
<?php $timestamp = time(); for ($day = 0 ; $day <= 7 ; $day++): ?>
<tr>
<th><?php echo date('D', $timestamp); ?></th>
<th><?php echo date('d-m-Y', $timestamp); ?></th>
<td><input type="checkbox" value="1" name="x"></td>
</tr>
<?php $timestamp += 24 * 3600; endfor; ?>
I need to generate only a week with days from current month and last month and put all in array.